PC Review


Reply
Thread Tools Rate Thread

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

 
 
Richard
Guest
Posts: n/a
 
      30th Jan 2010
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
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      30th Jan 2010
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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Richard" <(E-Mail Removed)> wrote in message
news:B157839E-2F2E-4329-953E-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Bob Bridges
Guest
Posts: n/a
 
      30th Jan 2010
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?

--- "Richard" wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Q: Check if data is changed in a SQL Table Martin Arvidsson, Visual Systems AB Microsoft C# .NET 3 13th Aug 2008 01:25 AM
How can I check/verify data in my Data Source for Pivot table? gayleh Microsoft Excel Worksheet Functions 1 16th Apr 2008 08:30 PM
Populating data from one table into another when a check box is tr =?Utf-8?B?VGVycnkgV2FsbA==?= Microsoft Access Forms 1 13th Jul 2007 12:34 AM
check whether that data is in the table EMILYTAN Microsoft Access Form Coding 7 17th Apr 2007 02:31 AM
fastest way to check if a table contains the data miro.cepciansky@va-utveckling.se Microsoft ADO .NET 2 13th Nov 2003 11:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:20 PM.