how to see if a field exists in table

D

Daniel M

I have a table "assets" that i would like to search through in the
"Serialnumber" column for value x. can someone help me on how ot do this?

ie:
if x exists in assets.serialnumber then msgbox "exits" else msgbox "value
does not exist"

thanks.
 
D

Daniel M

That's all good and i got it working but it is extreamly slow. I have a table
with 40k plus records in it and i am looking up 50-100 items. any suggestions
on how to speed it up? maybe sometype of function?

thanks.

Bill said:
DLookup is as good as any to find what you're
looking for.

See VBA HELP text for DLookup

Sample:
Dim varX As Variant
varX = DLookup("[LastName]", "Employees", "[EmployeeID] = 1")


Daniel M said:
I have a table "assets" that i would like to search through in the
"Serialnumber" column for value x. can someone help me on how ot do this?

ie:
if x exists in assets.serialnumber then msgbox "exits" else msgbox "value
does not exist"

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top