Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    June7 thank you for that!

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Glad it's working.

    However, now I think labels are better choice for the name and ID values because then users could not click into them (although the ID controls can be not visible to prevent that).

    If you do stay with textboxes and they are visible, be sure to set as Locked Yes and TabStop No.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    @June7 Thanks man.. I actually have one other question inside the submitting code

    Code:
    Private Sub CommandSubmit_Click()
    Dim DBSS As Database
    Dim rs As DAO.Recordset
    Dim i As Integer
    
    Set DBSS = CurrentDb
    Set rs = CurrentDb.OpenRecordset("SELECT EXP_ID, ADate, Attended FROM Attendance")
    
    
    
    With rs
            For i = 1 To 25
                .AddNew
                !ADate = Me.Text0.Value
                !EXP_ID = Me.Controls("exp" & i).Value
                !Attended = Me.Controls("attend" & i).Value
                .Update
            Next i
    End With
                End
    rs.Close
    Set rs = Nothing
    DoCmd.Close
    
    
    End Sub
    I have it working with this code.. However there are some times going to be blanks on the me.controls("exp" & i).value and i tried adding an IF Statement inside of the FOR statement. But I am getting an error that it can't continued.. I am not sure how I would add an IF Statement inside of the FOR Statement.

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Do you want to exit For with the first blank Exp_ID?

    For i = 1 to 25
    If Me.Controls("exp" & i) & "" = "" Then
    Exit For
    Else
    With rs
    ...
    End With
    End If
    Next
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    Thank you very much for the help.. It is working out standing now.. I have the EXP_ID and the Names locked, tab stop = no and the EXP_ID is not visible..




    Thanks AGAIN

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

Similar Threads

  1. Adding Records to a Table From Form Question
    By McArthurGDM in forum Access
    Replies: 1
    Last Post: 03-11-2015, 07:35 PM
  2. Replies: 10
    Last Post: 12-24-2013, 12:53 PM
  3. Replies: 1
    Last Post: 03-05-2013, 02:37 PM
  4. Adding records to a table from a form
    By paulofranchico in forum Forms
    Replies: 1
    Last Post: 02-07-2012, 11:30 AM
  5. Replies: 5
    Last Post: 03-23-2011, 02:28 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