Results 1 to 4 of 4
  1. #1
    Nsquared is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    2

    Multi Update By Checkbox

    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

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,524
    Personally I would use a multiselect listbox:

    http://www.baldyweb.com/MultiselectAppend.htm

    Though the technique could be modified to step through what I assume is a subform listing people at the top of your form.

  3. #3
    Nsquared is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    2
    Thanks PBaldy

    Your Program was just what I was looking for.

    Question, can your program be modified use the results from a combobox instead of a txtbox

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,524
    Absolutely; you could point to any control that has a value you want to use, and you can have more than one.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multi value field - Combobox help
    By stougch in forum Forms
    Replies: 0
    Last Post: 10-19-2009, 10:47 PM
  2. Multi Level Form
    By bkelly in forum Access
    Replies: 2
    Last Post: 08-28-2009, 11:15 AM
  3. Multi Page Forms?
    By Simon Sweet in forum Forms
    Replies: 0
    Last Post: 03-05-2008, 04:01 PM
  4. Multi-select listbox and update flag in table
    By Suresh in forum Programming
    Replies: 0
    Last Post: 12-19-2007, 01:04 AM
  5. Checkbox to update value
    By Wrangler in forum Forms
    Replies: 1
    Last Post: 01-03-2006, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums