Error: too few parameters. Expected 1

xcessminds

New member
Local time
Today, 12:33
Joined
Dec 19, 2007
Messages
8
Hi All,

I am getting problem "Error: too few parameters. Expected 1" when following Query is executed to updated a Flag Value in a table on Click event of a Submit button.


CurrentDb.Execute "UPDATE Scheduled_Appointment SET Is_Taken = 1 WHERE Scheduled_Appointment_ID LIKE Me.Sch_P_ID"

Where:
Table: Scheduled_Appointment
Column: Scheduled_Appointment_ID [Primary Key]
Column: Is_Taken [ColumnType = Number ]

Text Field: Me.Sch_P_ID [contains the Scheduled_Appointment_ID value for the selected Record on the Form]

Thanks in Advance.
 
CurrentDb.Execute "UPDATE Scheduled_Appointment SET Is_Taken = 1 WHERE Scheduled_Appointment_ID LIKE " & Me.Sch_P_ID

or

CurrentDb.Execute "UPDATE Scheduled_Appointment SET Is_Taken = 1 WHERE Scheduled_Appointment_ID LIKE '" & Me.Sch_P_ID & "'"


???
 
Ken thanks, it worked.

Now,i have another issue, I have two Tabs in a Form

Tab1 - has a Subform as Continious Form [as appointments that has Is_Taken =0]
Tab2 - Some fields to Submit

When I submit button on Tab2, i set the Focus to Tab1 on Click Event.

What I need, when Tab1 get focus it should refresh the data as one row has been updated as Is_Taken as 1.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom