Hi, in the current job im having we're using a form to record data into a table by clicking a button to which I have associated a macro but the thing is that when i click the button it actually does record the field i want but it also duplicates the amount of records that my table has, so for example if it originally has 12,000 records after i click the button it updates the table to now have 24,000 records and the new 12,000 are just empty with no data except for the data i input in the form.
Excuse my english, im not a native speaker, i hope i make my point clear.
The macro im using is this one:
Code:
Private Sub Command5_Click()
Dim SQL As String
If Not IsNull(PAGO) Then
SQL = "INSERT INTO OCREA48 (PAGO) SELECT forms.Form1.PAGO FROM OCREA48;"
DoCmd.RunSQL SQL
MsgBox "Record Saved", vbInformation
End If
End Sub
Ocrea48: my original table
PAGO: is the field I'm affecting with the form and the button