Hello,
I have a table: tblMinutes
With the fields: ID, CompName, MinuteDate, MinuteText, NextVisit
I have a form: frmMinuteNew
With the textbox: [CompName], [MinuteDate], [MinuteText], [NextVisit]
All the textbox are UnBound EXCEPT the first one which is bound as follows: =Forms!frmProsp ectDisplayMain! CompName
The Record Source for frmProspectDisp layMain is tblProspects. frmProspectDisp layMain contains two subforms.
I have a button on frmProspectDisp layMain. When the user clicks on the button, it opens frmMinuteNew, which has ALL empty fields EXCEPT textbox [CompName]
I want the user to be able to complete the uncomplete textbox and then save the data by clicking on a button.
The code I wrote for the recording macro (that saves by clicking on a button) (inspired from a previous work) is as follows:
But it did not work this time…
I have the message error:
Any idea how to resolve this problem?
Thank you and best regards.
G.
I have a table: tblMinutes
With the fields: ID, CompName, MinuteDate, MinuteText, NextVisit
I have a form: frmMinuteNew
With the textbox: [CompName], [MinuteDate], [MinuteText], [NextVisit]
All the textbox are UnBound EXCEPT the first one which is bound as follows: =Forms!frmProsp ectDisplayMain! CompName
The Record Source for frmProspectDisp layMain is tblProspects. frmProspectDisp layMain contains two subforms.
I have a button on frmProspectDisp layMain. When the user clicks on the button, it opens frmMinuteNew, which has ALL empty fields EXCEPT textbox [CompName]
I want the user to be able to complete the uncomplete textbox and then save the data by clicking on a button.
The code I wrote for the recording macro (that saves by clicking on a button) (inspired from a previous work) is as follows:
Code:
CurrentDb.Execute "Insert into tblMinutes ( CompName, MinuteDate, MinuteText, NextVisit) values ( " & [Forms]![frmMinuteNew]![CompName] & ", " & [Forms]![frmMinuteNew]![MinuteDate] & ", " & [Forms]![frmMinuteNew]![MinuteText] & ", " & [Forms]![frmMinuteNew]![NextVisit] & ")"
I have the message error:
Syntax error (missing operator) in query expression ‘(here you find the text in [Forms]![frmMinuteNew]![CompName])‘.
Thank you and best regards.
G.
Comment