Data type Conversion Error (MS Access)

psimpson

Registered User.
Local time
Today, 01:42
Joined
Aug 1, 2007
Messages
40
The above error message is returned when the following code is executed:

If rst(PROFESSIONAL_REG_NUMBER) > 0 Then

The table does list this field as number and the label from the form uses text. Is there a way to convert this field without changing the form? I am not certain the number of other pieces of code that might be using this field too.

Also, can you verify whether I am referencing the recordset field correctly?

Any help is appreciated.

Thanks.
 
Try

If rst!PROFESSIONAL_REG_NUMBER > 0 Then

or

If rst("PROFESSIONAL_REG_NUMBER") > 0 Then
 
And put Option Explicit at the top of all your modules.
 
That worked. Yes, Option Explicit is being used.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom