473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Retrieve record from query when loading form

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
4 1623
Hello can anybody help me on this please? :(
Jan 27 '08 #2
TerryDM
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
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
TerryDM
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

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

Similar topics

6
by: James Turner | last post by:
I am trying to store formatted text (windows format) into a MySQL database and then retrieve it. The field in the database is a varchar. I cut and paste the test into a form field formatted, then...
2
by: Lyn | last post by:
If I have a form where the RecordSource property is set to the name of a table, then on opening the SingleForm form I can cycle through all the records in the table one at a time via Next and...
19
by: davidgordon | last post by:
Hi, I need some pointers/help on how to do the following if it possible: In my access db, I have the following: Tables: Products, Sub-Assembly, Product-Pack Table, Products
4
by: Claudia Fong | last post by:
Hi, I have a form where I need to display the data of a department that stores in a access db. When I first load the form it will call a function name loaddata which will get the first...
9
by: Jeremy | last post by:
I have a situation where i am trying to run two query's and retrieve one record from each query, then using Union combine them into one recordset. The First Query is strait forward and should just...
6
by: AA Arens | last post by:
Hi, I have a database with 2 main forms. Contacts and companies. I share the base with two others via LAN. On the companies form I have buttons to navigate throught the records (>400). We are...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
4
ollyb303
by: ollyb303 | last post by:
Hi, I have a problem I need some help with. In my Access 2000 database (used for logging complaints to my company), I'm using the following code to send an email to our finance dept when a...
0
by: luppazzo | last post by:
Hello I have a query QProvvisori and a form Provvisorio. In the form I created a combobox to find a specific record using the email the combo has the following query: SELECT Anagrafica.eMail,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.