Multi Update By Checkbox

nsquared

New member
Local time
Yesterday, 17:39
Joined
Feb 9, 2010
Messages
6
Can anyone help me, I am new to creating forms and there functions, what I want to achive is for the information form the textboxs CampDetails, CampDate and NoNights to be put into the into table tbl_Camps for each of the members selected by the checkbox called itemcheck when I click on the Update Records Button.

I have attached a picture of the form below (CampUpdate.JPG)

The code I have created so far is

Private Sub UpdateRecords_Click()

DoCmd.RunSQL "INSERT INTO tbl_Camps (Camp, DateOfCamp, noofnights) VALUES (CampDetails, CampDate, NoNights)"

End Sub

Any help is greatly appreciated :(
 

Attachments

  • CampUpdate.JPG
    CampUpdate.JPG
    28.3 KB · Views: 90
Using VBA create a loop cycling through the list box rows, creating an appropriate record with DAO or ADO if the row is selected.

Don't you want to add the name in the listbox to each record?
 

Users who are viewing this thread

Back
Top Bottom