Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening A Related Form

Status
Not open for further replies.

CharlieT302

Instructor
Mar 17, 2005
406
US
Hi All,

I need to open a form that contains related information. Normally, this is simple but I need to pull the related form based on three fields; not one.

Fields:
Client_ID (text field)
Ref_Date (date field)
Cust (number field)

How do I set up the code to relate all three?

 
How would you do this with one field that is simple? Adding two more fields should be almost as simple.
Code:
Dim strWhere as String
strWhere = "Client_ID = """ & Me.txtClientID & """ AND  Ref_Date =#" & 
    Me.txtRefDate & "# AND Cust=" & Me.txtCust
DoCmd.OpenForm "frmYourForm",  , , strWhere

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top