How can I check whether the data is in the table or not with VBA?

R

Richard

Hi,

Hope someone have quick answer to my question.

I have a table call "IssueTable". I want to code to find out whether the
user inputed informaiton is in the IssueTable before user enter it in the
table.

I don't want to duplicate the issue in the issuetable. Therefore, I want to
check it before I enter it as new item.

In the Usertable, there is the Authrization# field and if user enter part of
Authrization#, I want the code to check if the User input is in the Issue
Table.

Thanks
 
A

Allen Browne

Use DLookup(). For examples, see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

Something doesn't feel quite right though. In general, you would want to
design your tables so there's only one table where all the authorization
numbers go.
 
B

Bob Bridges

Richard, I'm not sure I understand this question. What language do you speak
normally? If you write it your native language, assuming it's not something
exotic like Serbo-Croation or Turki, I might understand it better. Or you
could re-try English, just rephrasing it.

To save time, I'll guess (but I don't guarantee I'll guess right): If
you're trying to prevent Issues from being entered in the Issue table more
than once, why not design the Issue table to forbid duplicate keys?
 

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