From: Jeffrey Marks on 30 Apr 2010 21:59 I currently have a form that shows the number of participants allowed to attend a particular event. This field is displayed on the sign-up form for the event. The same form has a subform which does the sign-up (creating a many to many relationship record between participant and event). The users would like to count the number of participants on the subform who have signed up against the number of participants allowed field in the main form and flash a message of "FULL" if the participants reaches the number allowed. (They still want to be able to add more at their own discretion.) I've never compared fields between form and subform before, and wasn't sure about how to go about it. Thanks Jeff
From: John W. Vinson on 30 Apr 2010 22:24 On Fri, 30 Apr 2010 18:59:49 -0700 (PDT), Jeffrey Marks <jeffrmarks(a)gmail.com> wrote: > >I currently have a form that shows the number of participants allowed >to attend a particular event. This field is displayed on the sign-up >form for the event. The same form has a subform which does the sign-up >(creating a many to many relationship record between participant and >event). > >The users would like to count the number of participants on the >subform who have signed up against the number of participants allowed >field in the main form and flash a message of "FULL" if the >participants reaches the number allowed. (They still want to be able >to add more at their own discretion.) > >I've never compared fields between form and subform before, and wasn't >sure about how to go about it. > >Thanks > >Jeff One way would be to put a textbox txtSignedCount on the Footer of the subform, with a control source =Count(*). This will count the number of records signed up for this event. Then you can put another textbox on the mainform with a control source =IIF(Me!EventSize > Me!subformname.Form!txtSignedCount, Null, "FULL") Set its format to display in red 30 point type or whatever is apropos. -- John W. Vinson [MVP]
|
Pages: 1 Prev: Showing certain records in a form Next: Conditional Formatting question |