UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Run Macro Once Per Record, Access 2010    
 
   
guitarsweety
post Aug 20 2017, 11:47 AM
Post#1



Posts: 189
Joined: 1-December 11
From: Mt Airy, NC


how can I make this macro run one time per id: the primary key is EmpID

CODE
Private Sub updateavailable_Click()
Dim SQL As String
       Dim EmpID As Integer
      
  
       EmpID = Me.EmpID.Value
  
      HoursCarriedOver = Me.txtavailable.Value
    Me.updateavailable.Enabled = True
       If Not IsNull(txtavailable) Then
            SQL = "INSERT INTO T_Emp ([txtavailable]) VALUES ('" & HoursCarriedOver & "') WHERE T_Emp.EmpID = " & EmpID & ";"
                       End If
             Me.updateavailable.Enabled = False
End Sub
Go to the top of the page
 
guitarsweety
post Aug 20 2017, 01:33 PM
Post#2



Posts: 189
Joined: 1-December 11
From: Mt Airy, NC


Attached File  Labels.zip ( 277.91K )Number of downloads: 6
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th December 2017 - 10:51 AM