Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code for Autofill Checkbox not working

Status
Not open for further replies.

Lavenderchan

Technical User
Jul 21, 2008
132
0
0
US
Hello,

I have this code to autofill the check box if a property that is in its table is selected. I put this code in the after update event on the field and its not working. I am not sure what I am missing.
Thanks,
Keri
Private Sub Is_RD_Property_AfterUpdate()
Dim FillCheckBoxSQL As String
Dim CheckBoxHMO As Boolean
Const QtString As String = ""

CheckBoxHMO = True

FillCheckBoxSQL = "INSERT [RD Properties]([Property Name]) VALUE(" & CheckBoxHMO & ")"

DoCmd.RunSQL = FillCheckBoxSQL
End Sub
 

How about...
Code:
DoCmd.RunSQL FillCheckBoxSQL

Randy
 
Hello Randy so I need to take the = sign out of the last line of the code?
Thanks,
Keri
 
Anyway your SQL code has syntax error ...
BTW, you want an INSERT or an UPDATE ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top