FindRecord

N

nbohana

Hi, I need help, I am using the following code to find and display a record.
The code finds the record ok but only displays the last name field. The last
name is what I am searching on. How do I display the entire record. Please
help!!!


Private Sub Find_Click()
On Error GoTo Err_Find_Click

Dim IdValue As String

IdValue = Me![Search-Box]

Screen.PreviousControl.SetFocus
DoCmd.FindRecord IdValue, acEntire, True, A_ALL, True

Exit_Find_Click:
Exit Sub

Err_Find_Click:
MsgBox Err.Description
Resume Exit_Find_Click

End Sub
 
N

nbohana

Hi HTH, I have my window setup that way. All of my text boxes are tied to a
field in the data table. (i.e fname, lname etc). When I do FindRecord on the
last name the last name text box displays the correct data but nothing else
changes. So I do not get all if the record. What else can I do Please help
--
Norm Bohana


corics15 via AccessMonster.com said:
Hello! On your form, put text boxes bound to your table, for example, if you
have a text box named txtIDValue then on its control source put the field
that corresponds to txtIDValue and same thing goes for last name. Put a text
box say, txtLastName and on its control source put the field again that
corresponds to txtLastName, same thing goes for the fields you want to see.

HTH!
Hi, I need help, I am using the following code to find and display a record.
The code finds the record ok but only displays the last name field. The last
name is what I am searching on. How do I display the entire record. Please
help!!!

Private Sub Find_Click()
On Error GoTo Err_Find_Click

Dim IdValue As String

IdValue = Me![Search-Box]

Screen.PreviousControl.SetFocus
DoCmd.FindRecord IdValue, acEntire, True, A_ALL, True

Exit_Find_Click:
Exit Sub

Err_Find_Click:
MsgBox Err.Description
Resume Exit_Find_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top