Text box lookup

jlocke

Registered User.
Local time
Today, 01:07
Joined
Jul 23, 2002
Messages
31
I want to open a form to a specific record based on a value i enter on another form. The first screen a user sees they are asked to enter a lastname or phone number to find a patient. All i want is to have the form open to the patients record.

Please help driving me crazy.
 
If I was you I would create a combo box woth the PatientID as the bound column and then on the ClickEvent:

On Error GoTo ErrorHandler

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "YourForm"
stLinkCriteria = "[PatientID]=" & Me.combo.Column(0)
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria, acFormEdit, acWindowNormal

Exit_Errorhandler:
Exit Sub

ErrorHandler:
MsgBox Err.Description
Resume Exit_Errorhandler
 
here's my mdb

I have a form called "frm Lookup Main" on it i have a combo box, set to "on click" event, now when i select the users last name the form "frm_arcust99A" should open to the last name that the uset selected. I get nothing.. I've tried the code that Mark suggested and that helped sort of...
 

Attachments

jlocke,

It is worth taking note of what the "Female of the Forum" Pat Hartman has to say as the lady knows what she is talking about!!!!
 

Users who are viewing this thread

Back
Top Bottom