S
smackedass
Hello,
Thanks again for your help. I posted below, here's part of my message:
Specifically: I have a table set up that has people's names, addresses, and
all kinds of other stuff. What I want to do is write code instructing the
Zip Code field to pull an established zip code once it reads the name of the
town (am dealing with approx. 10 towns).
I went to the recommended link, and tried the following code:
Sub Town_OnExit(Cancel As Index)
Dim varZipCode As Integer
var ZipCode = DLookup("Zip code", "tblTown", "Town = Harwich")
If (NotIsNull(varZipCode)) Then Me![02645] = varTown
When I go to debug it tells me: "Variable Not Defined", then shows 'ZipCode'
(from the 3rd line) highlighted.
Again, this definitely is not my area of expertise. From what little I do
know, it looks like the variable is defined. Perhaps it shouldn't be an
integer...if not, what should it be?
Can anyone offer any suggestions as to what I might be doing wrong?
Thanks, again.
smackedass
Thanks again for your help. I posted below, here's part of my message:
Specifically: I have a table set up that has people's names, addresses, and
all kinds of other stuff. What I want to do is write code instructing the
Zip Code field to pull an established zip code once it reads the name of the
town (am dealing with approx. 10 towns).
I went to the recommended link, and tried the following code:
Sub Town_OnExit(Cancel As Index)
Dim varZipCode As Integer
var ZipCode = DLookup("Zip code", "tblTown", "Town = Harwich")
If (NotIsNull(varZipCode)) Then Me![02645] = varTown
When I go to debug it tells me: "Variable Not Defined", then shows 'ZipCode'
(from the 3rd line) highlighted.
Again, this definitely is not my area of expertise. From what little I do
know, it looks like the variable is defined. Perhaps it shouldn't be an
integer...if not, what should it be?
Can anyone offer any suggestions as to what I might be doing wrong?
Thanks, again.
smackedass