Grouping or something?

smask

Registered User.
Local time
Today, 17:47
Joined
Jan 9, 2003
Messages
21
Hi!

I've got a table with Customer number and Customer name.

Now I'm making a form that will show name if you type in number.

Any suggestions?

/ Smask
 
Lose Focus!

In the field where the number is being entered into, in the LostFocus event, do something like this

dim db as Database
dim rs as Recordset

set DB = CurrentDB
set rs = db.OpenRecordset("Select Name from Customer where Number = " & txtNumber.value & ";")
txtName.value = rs.fields("Name")

Note: You must have a reference set to DAO in order to be able to declare a variable "as Database" or "as Recordset"

Cheers!
 
Thanks!

Working with charm! Eller vad det nu man säger!?

/ Smask
 

Users who are viewing this thread

Back
Top Bottom