J
jjstccean
Hi - please assist me with this?:
I have two tables - the 1st table is standard and receiving records
I'm entering and saving records from an unbound form. The second table
receives the new (next) Quote Number which goes into the QuoteNum
field together with other related fields. On the 2nd table the
QuoteNum field has an "Yes (No Duplicates)" setting.
This is the part of my CODE that saves the relevant record to my 2nd
table: an extract:
number exist? yes, goto next set of code:
number exist? no, then
If rStSaveInvNum.RecordCount <> 0 Then
With rStSaveInvNum
rStSaveInvNum.AddNew
rStSaveInvNum!InvoiceNextNum = Me.QuoteNumber
rStSaveInvNum!ClientID = Me.RelateToClient
rStSaveInvNum!InvNumDate = Me.QuoteDate
rStSaveInvNum.Update
rStSaveInvNum.Close
End With
End If
next set of code:
The problem I'm facing is that I'm not certain how to do code —
overlooking the fact that if the Quote Number already exist not to
attempting to add the number again — as I'm using the same Quote
Number for several lines at times. Then again, to add the new Quote
Number and related fields as the new Quote Number does not exist in
2nd table yet.
I have two tables - the 1st table is standard and receiving records
I'm entering and saving records from an unbound form. The second table
receives the new (next) Quote Number which goes into the QuoteNum
field together with other related fields. On the 2nd table the
QuoteNum field has an "Yes (No Duplicates)" setting.
This is the part of my CODE that saves the relevant record to my 2nd
table: an extract:
number exist? yes, goto next set of code:
number exist? no, then
If rStSaveInvNum.RecordCount <> 0 Then
With rStSaveInvNum
rStSaveInvNum.AddNew
rStSaveInvNum!InvoiceNextNum = Me.QuoteNumber
rStSaveInvNum!ClientID = Me.RelateToClient
rStSaveInvNum!InvNumDate = Me.QuoteDate
rStSaveInvNum.Update
rStSaveInvNum.Close
End With
End If
next set of code:
The problem I'm facing is that I'm not certain how to do code —
overlooking the fact that if the Quote Number already exist not to
attempting to add the number again — as I'm using the same Quote
Number for several lines at times. Then again, to add the new Quote
Number and related fields as the new Quote Number does not exist in
2nd table yet.