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

Retrieve record from query when loading form

P: 12
Hi! I want to ask how can I get the record from the query. I currently have a form with 5 comboboxes and a button. After the user fills those 5 comboboxes and hit the button, a new form is opened with 30 textboxes and comboboxes, I want all the 30 textboxes and comboboxes to show the value that based on the 5 values in the previous form (those 5 are primary keys in my table). My Access query return me correct record.

I have tried Dlookup(), but I keep getting null. Is there other way to do it besides Dlookup() ?
Jan 25 '08 #1
Share this Question
Share on Google+
4 Replies


P: 12
Hello can anybody help me on this please? :(
Jan 27 '08 #2

P: 14
You must put the values from the initial 5 combo boxes in the criteria of the record sources for the second page's fields. You have 3 options: (at least)

1. Leave the initial form open behind the second form so that you can reference the fields on it in the criteria of the second form's queries.

2. Pass the values of the combo boxes to the second form in hidden text fields after opening it, and reference the hidden fields in the second form's queries. You would need to requery all of the combo boxes too.

3. Use one form and put the initial combo boxes on it, and reference them directly. Again you would have to requery each of the combo boxes.

#3 would be my choice since it allows the user to continue to see the criteria that got them to the 'second form' while using the new additional combo boxes.
Jan 27 '08 #3

P: 12
You must put the values from the initial 5 combo boxes in the criteria of the record sources for the second page's fields. You have 3 options: (at least)

1. Leave the initial form open behind the second form so that you can reference the fields on it in the criteria of the second form's queries.

2. Pass the values of the combo boxes to the second form in hidden text fields after opening it, and reference the hidden fields in the second form's queries. You would need to requery all of the combo boxes too.

3. Use one form and put the initial combo boxes on it, and reference them directly. Again you would have to requery each of the combo boxes.

#3 would be my choice since it allows the user to continue to see the criteria that got them to the 'second form' while using the new additional combo boxes.
I don't get it, I'm sorry :( I'm new to Access, so can you list out the step how to do it?
Jan 28 '08 #4

P: 14
I don't get it, I'm sorry :( I'm new to Access, so can you list out the step how to do it?
Perhaps this is a very difficult problem for you to approach, and maybe it would be appropriate for you to use someone who is a professional to help you. If I were a programmer who needed help designing a lever to perform a specific task, I would hire someone who knew how to design that lever. I would not look for a person to give me the exact equation to solve my specific lever problem.
Jan 28 '08 #5

Post your reply

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