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

Auto fill

P: n/a
I have been trying to auto fill fields with DLookup - but it doesn't
seem to work..... can you help...

I have a name field and I want the address to automatically fill in
when the name field is filled in. I have load of othre fields that
would benefit from this so I need to get it working....

=DLookUp("[Gpcode]","[Conwydata]","[Gpcode] =[gp_practice]")

I have an unbound gp_practice field and want to fill in the gpcode
automatically... the table is called Conwydata - I followed the help so
where am I going wrong?

Elaine

Aug 17 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Baz
"Elainie" <El**************@bsc.wales.nhs.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
I have been trying to auto fill fields with DLookup - but it doesn't
seem to work..... can you help...

I have a name field and I want the address to automatically fill in
when the name field is filled in. I have load of othre fields that
would benefit from this so I need to get it working....

=DLookUp("[Gpcode]","[Conwydata]","[Gpcode] =[gp_practice]")

I have an unbound gp_practice field and want to fill in the gpcode
automatically... the table is called Conwydata - I followed the help so
where am I going wrong?

Elaine
If Gpcode is text:

=DLookUp("[Gpcode]","[Conwydata]","[Gpcode] =""" & [gp_practice] & """")

or, if it's a number:

=DLookUp("[Gpcode]","[Conwydata]","[Gpcode] =" & [gp_practice])
Aug 17 '06 #2

P: n/a
"Elainie" <El**************@bsc.wales.nhs.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>I have been trying to auto fill fields with DLookup - but it doesn't
seem to work..... can you help...

I have a name field and I want the address to automatically fill in
when the name field is filled in. I have load of othre fields that
would benefit from this so I need to get it working....

=DLookUp("[Gpcode]","[Conwydata]","[Gpcode] =[gp_practice]")

I have an unbound gp_practice field and want to fill in the gpcode
automatically... the table is called Conwydata - I followed the help so
where am I going wrong?
I think where you're going wrong is with the basic concept. Your names and
addresses should be in a lookup table so that, when you select a name you
get the address data (and any other data pertinent to the name selected) for
free.

Take a look at the way they handle "customers" in the Northwind sample
database that ships with Access.

HTH - Keith.
www.keithwilby.com
Aug 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.