• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

MS Access 2003 retreieve value from table

Hi Guys
What is the fastest way to retrieve the value of the Customer-id from the first recor of .Customers' table
Something similiar to FoxPro's:
USE custmers
varCust-id=Customer-id
Thanks
Dory
0
dory550
Asked:
dory550
  • 3
  • 2
1 Solution
 
Gustav BrockCIOCommented:
varCust-id = DLookup("Customer-id", "custmers")

/gustav
0
 
dory550Author Commented:

cactus_data:

Thanks  
That was short and sweet
I need another small advice pertaining to the same thread
Suppose I have a second table called 'Customers2'
I need to exract a shipping address from 'customers2' using the  varCust-id (outputed  above)
I can use:
varCo_Name=dlookup("[co_name]","customers2","cust_id='" & varCust-id & "'" )
varAddress1=dlookup("[Address1]","customers2","cust_id='" & varCust-id & "'" )
varCity=dlookup("[City]","customers2","cust_id='" & varCust-id & "'" )
And so on.......
My question is:
Is this an acceptable way for extracting shipping info in this senario?
How would you reccomend I do it?
Thanks
Dory
0
 
Gustav BrockCIOCommented:
It could be but most would open a DAO recordset and read from the fields.

Look up the on-line help on this. This is basic info you will need to be familiar with if you wish to move on with Access.

/gustav
0
 
dory550Author Commented:

cactus_data:

Thanks
Dory
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now