dbTalk Databases Forums  

using Find property in a form to locate records in a table

comp.database.ms-access comp.database.ms-access


Discuss using Find property in a form to locate records in a table in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christine
 
Posts: n/a

Default using Find property in a form to locate records in a table - 02-04-2004 , 12:11 PM






I am trying to create a data entry form for my database that will
enable a user to add a new record or alter an existing record in the
table all on one form. So far, the form is set up to display the
records of the table in text boxes at the bottom, and I can scroll
thru the records, and a button("Add A New Patient") will allow the
user to go to the end of the table and enter data. The other button
("Find A Patient") has been more difficult...here is the code I have
so far:

Private Sub Command42_Click()
Dim rs As Object
Set rs = Me.Recordset

rs.Filter = "[LastName] = '" & (Me!Text38) & "' and [FacilityCode] =
'" & (Me!Text40) & "'"

End Sub

I want the user to input the last name and facility coode of the
record they are trying to update, and have the form display that
record. The problem is that when I run this, the record I want does
not show up in the text boxes at the bottom of the form.
Can anybody help a beginner with this?
Thanks!

Christine

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.