Hi,
I have created a form with a text box. Under the text box is a button with a command to open an append query and enter the contents of the text box along with two other fields into a table. This works fine except that it always appends 8 identical rows instead of just the 1 it should be doing. I can't for the like of me work out the problem!
The code for the button click is:
The append query is quite basic. There are 3 fields. The first one just enters today's date so has field value "Date Written: Date()". The second one takes the contents of the text box so is "Notes: [Forms]![frmSearch]![AddNoteBox]" and the last one takes the URN, which is my unique ID and has value "URN: [Forms]![frmSearch]![URN]".
Does anyone know what could be causing this? Any help would be muchly appreciated!!!
Thanks
Russ
I have created a form with a text box. Under the text box is a button with a command to open an append query and enter the contents of the text box along with two other fields into a table. This works fine except that it always appends 8 identical rows instead of just the 1 it should be doing. I can't for the like of me work out the problem!
The code for the button click is:
Code:
Private Sub cmdSaveNote_Click()
On Error GoTo Err_cmdSaveNote_Click
Dim stDocName As String
stDocName = "qry_append_notes"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_cmdSaveNote_Click:
Exit Sub
MsgBox ([New Note Input])
Me.Refresh
Err_cmdSaveNote_Click:
MsgBox Err.Description
Resume Exit_cmdSaveNote_Click
End Sub
The append query is quite basic. There are 3 fields. The first one just enters today's date so has field value "Date Written: Date()". The second one takes the contents of the text box so is "Notes: [Forms]![frmSearch]![AddNoteBox]" and the last one takes the URN, which is my unique ID and has value "URN: [Forms]![frmSearch]![URN]".
Does anyone know what could be causing this? Any help would be muchly appreciated!!!
Thanks
Russ