473,386 Members | 1,819 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,386 software developers and data experts.

Pull data from another table

Hi,

I have a command button, when I press it I would like it to find the record
I have specified in a text box on the current form and to pull fields such
as Address 1 and Address 2 from another table into text boxes on the current
form.

The fields that are pulled into the current form need to be stored in the
table for the current form, so I do not beleive I could use DLookUp because
they will not be stored? only displayed.

Many Thanks...

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
Nov 13 '05 #1
1 3137
Normal relational design says you shouldn't have to store them. But
biz rules trump DB design rules in lots of cases...

One way to do it would be to open a recordset with the single recordID
parameter (basically a parameterized query or something like it) and
then you'd get one record with lots of fields. Then you could just set
all the fields you wanted...

can't remember the exact syntax, but you'd do something like

'all DAO
dim rs as recordset
dim qd as querydef
set qd=dbengine(0)(0).querydefs("MyQuery")
set qd.parameters(0)=Me.Fields("MyIDField")
set rs=qd.openrecordset

then you could access the fields in the recordset or whatever...
me.fields(0) = rs.fields(0)
or
me.controls("controlname").value=rs.Fields("FieldN ame")
....
so ya write it as a function and call it in a macro or whatever. or
skip that and just call it in a button.'s click event.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: cvillard | last post by:
I am new to SQL, as old as it is. I am not new to programming I normally just use Access. I have two tables for a little project manager I made. After updates I sent an email to the user. I need...
5
by: Julia Baresch | last post by:
Hi everyone, I haven't found any reference to this problem on this group or in Access 97 help. I hope someone here knows this - probably a simple thing, but not obvious. I designed a query to...
2
by: Jeremy Dillinger | last post by:
I have a program setup to pull data from a database. My database table has things such as (category, Item, price, etc.) In my program I want to have multiple list boxes that will have a pull down...
2
by: Gummy | last post by:
Hello, I have a pretty large table (22,000 rows, 40 columns) that I need to return to either a webpage (maybe a datagrid or just a table) or just spit out directly to Excel. This table is coming...
4
by: sparks | last post by:
We have a new project here, one that I have never tried maybe its easy I don't know yet. We have people that have records dating back over 5 yrs on a sql server. We have to build an access 2003...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
6
by: BinaryGirl23 | last post by:
Hi Everyone : ) I hope that this question is actually something easy in disguise. Re: Access 2003 I have a report that displays information about which of our employees worked at a given job over...
21
by: giandeo | last post by:
Hello Experts. Is it possible to retrieve the value from a populated pull down menu from a database and then use that value to access the same database to get the related fields. Example: ...
5
by: giandeo | last post by:
Hello Experts. Could you find a solution for this problem please! I have the following tables in Access Database Table Name: origin Fields Names: country, countrycode Table Name: make...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.