method or or data member not found

swmorin

Registered User.
Local time
Today, 16:06
Joined
Jan 10, 2012
Messages
66
I am including all of this becauseI dont know what the error means. I bolded the text that is highlighted by access.

Code:
        ElseIf Combo21 = "yes" And Combo1 <= 1 Then
           CurrentDb.Execute "INSERT INTO tbl_instructor_dates" _
          & "(Instructorid, dagb, 281type, fisddue, oandtdue, twdue, next281) VALUES " _
          & "(" & instridrs![instructorid] & " " & _
          ", # " & [Forms]![frm_create_instructor]![Text23] & " # " & _
          ", " & [Forms]![frm_create_instructor]![Combo1] & " " & _
          ",# " & DateAdd("m", 12, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",# " & DateAdd("m", 18, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",# " & DateAdd("m", 24, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ", # " & DateAdd("d", 60, [Forms]![frm_create_instructor]![Text23]) & " #);"
                           
        ElseIf Combo21 = "yes" And Combo1 > 1 Then
  
        Set days281rs = instriddb.OpenRecordset("select * from tbl_list_281_types where ((tbl_list_281_types.281ID) = ([Forms]![frm_create_instructor]![Combo1]))")
          CurrentDb.Execute "INSERT INTO tbl_instructor_dates" _
          & "(Instructorid, dagb, 281type, next281, last281, FISDcw, OANDTcw, fisddue, oandtdue, twdue, twcw) VALUES " _
          & "('" & instridrs![instructorid] & "' " & _
          ",# " & [Forms]![frm_create_instructor]![Text23] & " # " & _
          ", " & [Forms]![frm_create_instructor[B][COLOR=red]]![Combo1][/COLOR][/B] & " " & _
          ",# " & DateAdd("d", [days281rs].[281days], [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",# " & [Forms]![frm_create_instructor]![Text3] & " # " & _
          ",' " & [Forms]![frm_create_instructor]![Combo5] & " ' " & _
          ",' " & [Forms]![frm_create_instructor]![Combo7] & " ' " & _
          ",# " & DateAdd("m", 12, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",# " & DateAdd("m", 18, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",# " & DateAdd("m", 24, [Forms]![frm_create_instructor]![Text23]) & " # " & _
          ",' " & [Forms]![frm_create_instructor]![Combo9] & " ');"
          
    End If
    DoCmd.Close acForm, "frm_create_instructor", acSaveNo
End
 
Check in your form, have you got the field with the NAME Combo1.
 
Yes I did...

I apologize fo rnot updating this earlier but I found the problem although I don't understand why it was causing the error.

The problem was with the next line. And I replaced the "." with an "!" between the table and column name.

Code:
", " & [Forms]![frm_create_instructor]![Combo1] & " " & _
[B]          ",# " & DateAdd("d", [days281rs][COLOR=red]![/COLOR][281days], [Forms]![frm_create_instructor]![Text23]) & " # "[/B]
 

Users who are viewing this thread

Back
Top Bottom