MySQL be problems

groengoen

Registered User.
Local time
Today, 21:36
Joined
Oct 22, 2005
Messages
141
I transferred all the tables in a database be from the mdb to a mysql database. When I linked the "fe" to the mysql database most of the fairly simple modules worked perfectly but my main module ran into a "run time error 2448: you can't assign a value to this object" in a bit of code which ran perfectly on the "be" mdb.

Here is the code where the problem occurred with the line highlighted in blue:

Code:
    If Me.MemberNumber <> "" And Me.MemberNumber <> 0 And Not IsNull(Me.MemberNumber) Then
        
        'Get the Current VHI Member details from tblVHI
        rst2.ActiveConnection = cnn
        rst2.CursorType = adOpenStatic
        rst2.Open "Select * from tblVHIMember"
        'Find current member
        strSQL = "[MemberNumber] = " & Me.MemberNumber
        rst2.Find strSQL
        'Was it found?
        If rst2.EOF Then
            MsgBox Me.MemberNumber & " Member Not Found"
            Exit Function
        End If
        [COLOR="Blue"]Me.MainConsultant = wsDoctorCode[/COLOR]
        
        Forenames = rst2("Forenames")
        Surname = rst2("Surname")
        Address1 = rst2("Address1")
        Address2 = rst2("Address2")
        Address3 = rst2("Address2")
        Address4 = rst2("Address4")

This code is in a function which is called during the "Current" event of the form. As I said, the line works when linked to an access "be" table. Is there something I am missing from my mysql conversion? I don't think that there is anything intrinsically wrong with the code itself.
 

Users who are viewing this thread

Back
Top Bottom