G
Guest
I'm a .NET programmer trying to throw together a quick Access app but can't
figure out the object reference methods. I've got a main form with two
subforms, each in data sheet view. Datasheet 1 has a client list, datasheet
2 has a project list (multiple prj per client) and the main form has detail
project info. I want to click on a client and have the prj datasheet filter
to only those project for that client. Then click on a project and view the
prj detail on the main form for editing.
In the Form_Current event of the Client subform, I'm trying this:
Forms![MainFrm]![ActiveProjectLst].SourceObject.filter = "select name from
ActiveProjectsQry where ClientID = '" & ActiveClientLst.ClientID & "' "
where MainFrm is the top level form
ActiveProjectLst is the subform container for datasheet 2
ActiveClientLst is the subform container for datasheet 1
My first question is: is this the proper approach? Second: How do I refer
to the filter property of a datasource on a subform????? Also, How do I get
the current ID value out of one subform and use it in the filter for another
subform?
Pls help - I bid 8 hours on this "simple" app and am already 5 hours into it
with no end in sight.
figure out the object reference methods. I've got a main form with two
subforms, each in data sheet view. Datasheet 1 has a client list, datasheet
2 has a project list (multiple prj per client) and the main form has detail
project info. I want to click on a client and have the prj datasheet filter
to only those project for that client. Then click on a project and view the
prj detail on the main form for editing.
In the Form_Current event of the Client subform, I'm trying this:
Forms![MainFrm]![ActiveProjectLst].SourceObject.filter = "select name from
ActiveProjectsQry where ClientID = '" & ActiveClientLst.ClientID & "' "
where MainFrm is the top level form
ActiveProjectLst is the subform container for datasheet 2
ActiveClientLst is the subform container for datasheet 1
My first question is: is this the proper approach? Second: How do I refer
to the filter property of a datasource on a subform????? Also, How do I get
the current ID value out of one subform and use it in the filter for another
subform?
Pls help - I bid 8 hours on this "simple" app and am already 5 hours into it
with no end in sight.