dBASE data type mismatch - using CAST?

rctong

Registered User.
Local time
Today, 01:42
Joined
Apr 1, 2009
Messages
11
Anyone got an idea how to fix a data type mismatch when linking to a dBASE table on a seperate server?

Used the following code before when using local Access 2007 tables but the incompatibility with dBASE is preventing access from recognising that data types are both numbers!

Code:
Private Sub Command110_Click()
    With CodeContextObject
        DoCmd.OpenForm "BunkerCertQuery", acNormal, "", "[SERIAL]=" & Nz(.SERIAL, 0), , acNormal
        If (Not IsNull(.SERIAL)) Then
            TempVars.Add "CurrentID", "[SERIAL]"
        End If
        If (IsNull(.SERIAL)) Then
            TempVars.Add "CurrentID", "Nz(DMax(""[SERIAL]"",[Form].[RecordSource]),0)"
        End If
        DoCmd.Requery ""
        DoCmd.SearchForRecord , "", acFirst, "[SERIAL]=" & TempVars!CurrentID
        TempVars.Remove "CurrentID"
        DoCmd.Close acForm, "Search"
    End With
End Sub
 

Users who are viewing this thread

Back
Top Bottom