SQL Problem - Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone


Can someone help me with the following problem:

SQLValid = "Select * from [Item Master] where [part #] = " & _
"'" & [Forms]![Actual Stocktake]![YPROD] & _
"' And [valid or invalid]= 'v'"

The stated query works well, but what I am trying to do is insert a certain
criteria relating to quantity limits. In the same Item Master table, I have a
column called QLIMIT. This column includes a quantity limit for each part.
E.G. Part 1234 has a QLIMIT of 5. This means that only 5 of this part can
exist.

When I scan more than 5 parts, I want Access to produce a warning telling me
that I have exceeded the QLIMIT. Is this possible.

Your help would be greatly appreciated.

Cheers
Jack
 
Hi

Yes there is a form that is used to perform a scan. The problem is that I
have to scan 100's of barcoded items, and there is a strong possibility that
quantity limits for some parts will be exceeded. Can you tell me more about
this beforeupdate event property?

Cheers

[MVP] S.Clark said:
At the time of scanning would be the appropriate time to check for the
limit.

Assuming there is a form used to perform the scan, check using the
BeforeUpdate event property.


--
Steve Clark, Access MVP
FMS, Inc
http://www.fmsinc.com/consulting
Professional Access Database Repair
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

Jack said:
Hi Everyone


Can someone help me with the following problem:

SQLValid = "Select * from [Item Master] where [part #] = " & _
"'" & [Forms]![Actual Stocktake]![YPROD] & _
"' And [valid or invalid]= 'v'"

The stated query works well, but what I am trying to do is insert a
certain
criteria relating to quantity limits. In the same Item Master table, I
have a
column called QLIMIT. This column includes a quantity limit for each part.
E.G. Part 1234 has a QLIMIT of 5. This means that only 5 of this part can
exist.

When I scan more than 5 parts, I want Access to produce a warning telling
me
that I have exceeded the QLIMIT. Is this possible.

Your help would be greatly appreciated.

Cheers
Jack
 
Back
Top