hello need help for this how can i trap if my mch_rs!qtyh is zero
example H1010 the quantity on hand is 10 then if i input quantity 10 then click the add button
so now my H1010 is zero.then if i input again the H1010 it should prompt that the quantity on hands is already zero...please help me on this how to trap if my quantity on hand is already zero....because i don't know how to trap if my quantity is already zero..hoping for your positive responds....
jemz -1 Master Poster
Recommended Answers
Jump to PostOkay, before you check for a quantity, check for records first...
So when users enters something and searches, your process would be something like this psuedo code...
strSQL = "SELECT * FROM tablename WHERE fieldname = '" & user_input & "'" open rs If rs.recordcount <> …
Jump to PostOkay, you are saying you want to edit a field? You want to set some field in some table = to some value?
strSQL = "UPDATE tablename SET fieldname = " & somevalue
if string then ... '" & somevalue & "'"
if number, as show in …
Jump to PostEverything looks good except for line 4, you should use a command object there and not a recordset object, beyond that, the only thing I can say anything about is you indenting of the code in that section needs to be cleaned up a little...
Good Luck
Jump to PostYou know what, it should actually be easier for you to use the connection object to execute you sql insert statement, but here is an example of both from an old test prog...
Option Explicit Dim S As String Private Sub Form_Load() Dim adoCn00 As ADODB.Connection Dim …
Jump to PostBecause you are inserting a record, not returning a record. When records are returned, use a recordset. When just updating, inserting, or deleting, use either the connection object, or the command object.
Good Luck
All 58 Replies
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
jemz -1 Master Poster
AndreRet 526 Senior Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
vb5prgrmr 143 Posting Virtuoso
jemz -1 Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.