L
la knight
I'm hoping someone can help me figure out what to do with this situation. I
can not get my subform records to be filtered. Here's what I have:
Main Form (based on Query1 with a OnCurrent event which states
ComboFindRecord = PART)
Main Form Header (contains the combobox called ComboFindRecord with an
AfterUpdate event to find the matching record which is:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PART] = '" & Me![ComboFindRecord] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Also, an OnEnter event was in there too so that it would force the combobox
to requery the database to get most current info each time. But I took it out
because the queries were taking to long, but I'd really like it to stay. It
read like this:
me.Recordset.Requery
Main Form Detail Section (contains fields related to the record chosen in
the ComboFindRecord box)
Main Form Detail section (Also contains my SubForm)
SubForm (based on Query2) Query2 needs to know which part was chosen in the
Main Form so I currently have the field criteria in Query2 set to:
[Forms]![MainForm]![PART]. What Query2 does is take the chosen part name
from Query1 on the Main Form and passes it to Query2 on the subform in order
to find a subpart of the mainpart. All of which works fine.
SubForm Header (contain the subpart name field along with a fwe other fields
with general info on the subpart)
SubForm Detail Section (contains the purchase order field and date due field
for all the records which relate to the subpart name, HOWEVER, I need to
display ONLY purchase orders for subpart name which have a date due of
1/1/1900. And I can't get it to work. I've tried many things but am obviously
doing something wrong.
I would normally weed out those records in my Query2 but I can't, because I
need the basic info for the subpart name to still show up in the HEADER, even
if there are no record details which fit the criteria of Date Due 1/1/1900.
And I hate to have to generate another query to filter the records for the
detail section because the entire form is already complicated using 2
subqueries for Query2 (all together there are four queries to run the form.
I hope I've explained everything well enough. If someone could help talk me
through this one, it would be very appreciated.
can not get my subform records to be filtered. Here's what I have:
Main Form (based on Query1 with a OnCurrent event which states
ComboFindRecord = PART)
Main Form Header (contains the combobox called ComboFindRecord with an
AfterUpdate event to find the matching record which is:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PART] = '" & Me![ComboFindRecord] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Also, an OnEnter event was in there too so that it would force the combobox
to requery the database to get most current info each time. But I took it out
because the queries were taking to long, but I'd really like it to stay. It
read like this:
me.Recordset.Requery
Main Form Detail Section (contains fields related to the record chosen in
the ComboFindRecord box)
Main Form Detail section (Also contains my SubForm)
SubForm (based on Query2) Query2 needs to know which part was chosen in the
Main Form so I currently have the field criteria in Query2 set to:
[Forms]![MainForm]![PART]. What Query2 does is take the chosen part name
from Query1 on the Main Form and passes it to Query2 on the subform in order
to find a subpart of the mainpart. All of which works fine.
SubForm Header (contain the subpart name field along with a fwe other fields
with general info on the subpart)
SubForm Detail Section (contains the purchase order field and date due field
for all the records which relate to the subpart name, HOWEVER, I need to
display ONLY purchase orders for subpart name which have a date due of
1/1/1900. And I can't get it to work. I've tried many things but am obviously
doing something wrong.
I would normally weed out those records in my Query2 but I can't, because I
need the basic info for the subpart name to still show up in the HEADER, even
if there are no record details which fit the criteria of Date Due 1/1/1900.
And I hate to have to generate another query to filter the records for the
detail section because the entire form is already complicated using 2
subqueries for Query2 (all together there are four queries to run the form.
I hope I've explained everything well enough. If someone could help talk me
through this one, it would be very appreciated.