Comparing two data fields in Access through Visual Basic 
Author Message
 Comparing two data fields in Access through Visual Basic

I have a database that resides in Access. I can access it from
Visual Basic and add new records. But the problem is that i can
not control the entry of data to be saved in these fields.

this is the code that doesn't work

Private Sub qty_orderedText_Validate(Index As Integer, Cancel As
Boolean)
    If qty_orderedText.Text < qty_receivedText.Text Then
    MsgBox ("Error")
    End If
End Sub

I'm writing the above code under both, the text of the fild
qty_ordered and the text box of the field qty_received.
I just want to say that u can not recieve items number more than
the items number u ordered.
Both of the two fields in access are of the same type (Number).
Any help would be appreciated
Thank you

* Sent from RemarQ http://www.*-*-*.com/ The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Mon, 23 Sep 2002 03:00:00 GMT  
 Comparing two data fields in Access through Visual Basic
Use qty_orderedtext or qty_orderedtext.value
not qty_orderedtext.text


Quote:
> I have a database that resides in Access. I can access it from
> Visual basic and add new records. But the problem is that i can
> not control the entry of data to be saved in these fields.

> this is the code that doesn't work

> Private Sub qty_orderedText_Validate(Index As Integer, Cancel As
> Boolean)
>     If qty_orderedText.Text < qty_receivedText.Text Then
>     MsgBox ("Error")
>     End If
> End Sub

> I'm writing the above code under both, the text of the fild
> qty_ordered and the text box of the field qty_received.
> I just want to say that u can not recieve items number more than
> the items number u ordered.
> Both of the two fields in access are of the same type (Number).
> Any help would be appreciated
> Thank you

> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!



Tue, 24 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. comparing data in specific fields from two tables ???

2. comparing field values from two different access databases

3. Visual Basic .NET compared to MS Access

4. compare two fields values

5. Key field violation when comparing two tables

6. VB - Compare two list box items - display the matched fields in list3

7. VB - Compare two list box items - display the matched fields in list3

8. compare PowerBuilder, Visual Basic and Visual C++.

9. compare PowerBuilder, Visual Basic and Visual C++.

10. COMPARE: Visual Age, Visual BASIC, Delphi ?

11. Visual Basic 4.0a error with ORACLE Data source accessing BLOB data

12. ADO Data Control in Visual Basic 5 with Microsoft Data Access SDK 2.0

 

 
Powered by phpBB® Forum Software