467,858 Members | 1,725 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,858 developers. It's quick & easy.

Using a variable for find record method.

Ok what I have is a list of boxes on a form that are connected to fields in my database. There is an extra box I want to be able to put the record number in and it automatically load the data corresponding to that record in the associated boxes. When I have the form running I can go to the editmenu in access and use find(ctrl+f) type in the number and it works. I know it has something to do with the DoCmd.FindRecord method. I tried using DoCmd.FindRecord cboBox,,True,,True and that doesnt work. I need some serious help on this, Thanks in advanced.
Jan 18 '07 #1
  • viewed: 3469
Share:
2 Replies
Actually maybe this will make it easier but I still cant figure out how to do it. I have a form that has a subform of a query(named query_1). On that form is a search button with filters. What I want the program to do is after the search is done, you can highlight one of the records then click my add/change delete button, which brings up a form with the corresponding txt boxes, and it brings up the information of the highlighted record in those text boxes.
Jan 18 '07 #2
Expert 100+
Hi

Try using:-
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm FormName, ,, WhereCondition,acFormEdit 
'WhereCondition' would say something like:-
Expand|Select|Wrap|Line Numbers
  1. "RecordID = " & Me.RecordID
where the recordID comes from a combobox, or whatever..

HTH

Steve
Jan 18 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by rJ | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.