Help needed creating a filter form. (1 Viewer)

Chunk

Registered User.
Local time
Today, 19:07
Joined
Oct 25, 2004
Messages
64
I need to have a form which has a series of blank text boxes on it.

I then need a subform, that has all of the text boxes as above, in datasheet layout.

I then want to be able to type values into the text boxes on the main form, and have the user then click a button. If any records exist with the values that have been typed in, they should be listed on the sub form.

If the main part of the form had combo boxes then that would also be good.

Finally, I want the user to be able to double click on one of the rows that have been found, and for this data to be loaded into a third form.

Is this possible? Could someone help me out, by maybe linking me to a source that will help me, by explaining how to do it, or maybe by letting me know where i can get a sample database that does this sort of thing.

Thanks very much.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 19:07
Joined
Jul 9, 2003
Messages
16,407
Have a look at item six on this web page.

This demonstrates the selection of records with combo boxes.

And the following code (suitably modified) could be added to the above example to open your third form And display the selected record details.


Code:
Dim strDocName As String
strDocName = "3rdForm"

   
   DoCmd.OpenForm strDocName, , , , acFormAdd, acHidden
                
                With Forms(strDocName)
                    .Filter = "OrdersID = " & Me!sub1.Form!txtOrderID & ""
                    .FilterOn = True
                    .Visible = True
End With
where :
sub1 >>>> Is the subform window on your main form that contains Your subform
txtOrderID >>>> is the reference number for the record that is displayed in the subform and the record you want displayed on the third Form

OrdersID >>>> Is the name of the control on the third form that matches the record number of the record you have selected in the subform.
 

Users who are viewing this thread

Top Bottom