Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010

    Unanswered: Regarding linking checkbox in the form to the checkbox in the table dynamically.

    I have a form which contains a alert checkbox. And i have a checkboxes in the table for each student. So in the form If i click checkbox for a particular student. Then it should be checked in the table alert field checkbox. So please can any body help me in solving this. Or providing me any vb code to perform this task.

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    If the form is bound the the table (directly or through an updatable query) you don't have anything to do: just assign the ControlSource property of the checkbox to the corresponding column in the table.

    Otherwiwse, you can use a function such as:
    Private Sub Check_Alert_AfterUpdate()
        Dim strSQL As String
        strSQL = "UPDATE Table1" & _
                 " SET [Alert] = " & Me.Check_Alert.Value & _
                 " WHERE [StudentID] = " & Me.Text_StudentID.Value
        CurrentDb.Execute strSQL
    End Sub
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts