user selects subform filters other subform (1 Viewer)

tubar

Registered User.
Local time
Today, 12:00
Joined
Jul 13, 2006
Messages
190
i have a form with 2 subforms. when the user selects a record in subform one. the date of that record filters subform 2. in the source query of subform 2 i have this under criteria
Code:
[Forms]![frmeventbuild]![frmBUILD]![EVENT_DATE]
. i think reuery would help me but i dont know where to place it. sorry im new and any help would be great!
 

pr2-eugin

Super Moderator
Local time
Today, 18:00
Joined
Nov 30, 2011
Messages
8,494
so how does the user Select the record? Click of a button? ComboBox? Based on the method, AfterUpdate or Click method should do the trick..
 

tubar

Registered User.
Local time
Today, 12:00
Joined
Jul 13, 2006
Messages
190
the subform is a data sheet. the user can jus select a rcord or a feild in record. the source of subfrom 2 is a query whos criteria is based on the date in subform 1. subform one has many dates. when the user selcts a different record with a different date the other subform needs to requery. i tried it onclick and after update with nothing
 

pr2-eugin

Super Moderator
Local time
Today, 18:00
Joined
Nov 30, 2011
Messages
8,494
Try the date control's On Click method or more preferred On Double click.. Not the Form Click..
Code:
Private Sub [COLOR=Blue]dateControl[/COLOR]_DblClick(Cancel As Integer)
    Me![COLOR=Blue]subFormName[/COLOR].Form.Requery
End Sub
 

Users who are viewing this thread

Top Bottom