By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

Using a variable for find record method.

P: 49
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
Share this Question
Share on Google+
2 Replies


P: 49
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+
P: 218
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.