Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114
    In the link given look at the section of the OnCurrent code that begins "for icount = .... ". and ends with "Next iCount ".


    That's a loop. I was suggesting for you to build something similar but instead of elongating a string, include the appropriate code to update [event] each time there's a pass that contains a selected [client] Sorry, no time to elaborate. Perhaps someone will provide code. Also, can never hurt to study up on VBA techniques, particularly looping through recordsets.


    good luck, Ron

  2. #17
    roarcrm is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2014
    Posts
    27
    Thanks...

    The code I currently have is:
    Code:
    Private Sub Command25_Click()
    
    Dim rst As Recordset
    Set rst = CurrentDb.OpenRecordset("Session")
    With rst
         .AddNew
         .Fields("ClientID") = ClientCombo.Value
         .Fields("Date") = Date.Value
         .Fields("Duration") = Duration.Value
         .Fields("SessionType") = Session.Value
         .Fields("Officer") = Officer.Value
         .Fields("Comment") = Comment.Value
         .Update
     End With
     DoCmd.Close acForm, "Log Session", acSaveYes
    End Sub
    The client ID is a combo box where they select one client and it's added to the table. If this was changed to allow multiple selections can someone help me to change that code?

    Thanks.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. design question
    By kris9 in forum Access
    Replies: 5
    Last Post: 06-15-2013, 05:31 PM
  2. DB Design Question
    By rparker85 in forum Database Design
    Replies: 1
    Last Post: 03-20-2013, 10:36 AM
  3. Design question
    By Daryl2106 in forum Access
    Replies: 2
    Last Post: 11-24-2011, 08:43 AM
  4. DB design question
    By dlburkins in forum Database Design
    Replies: 2
    Last Post: 08-28-2009, 07:06 PM
  5. Design Question
    By bdriscoll in forum Database Design
    Replies: 3
    Last Post: 05-03-2009, 08:57 AM

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