chrisjames25
Registered User.
- Local time
- Today, 20:29
- Joined
- Dec 1, 2014
- Messages
- 404
Hi All
Having an issue with a form and an update query. I have one update query that and make in query design (Image attached (update query working). I click a command button and run the following vba and it work:
This works fine. I have another command button that when i click it i need it to look at a txtbox in the form and run an update query to a field based on the input in the text box. For example in the txt box it may say batchno 5033. I need it to look in the table data and find that batch no only and then mark another field in the table as false. See image of how i have done this (update query not working). I then use the code:
I keep getting an erorr code come up saying "run time error 3061 too few parameters. expected 1". THe field names match the table so i cant understand what i have done wrong.
Having an issue with a form and an update query. I have one update query that and make in query design (Image attached (update query working). I click a command button and run the following vba and it work:
Code:
Dim dbs As DAO.Database
Set dbs = CurrentDb
dbs.Execute ("qry_batchupdate")
Me.Sub_Batch.Form.Requery
This works fine. I have another command button that when i click it i need it to look at a txtbox in the form and run an update query to a field based on the input in the text box. For example in the txt box it may say batchno 5033. I need it to look in the table data and find that batch no only and then mark another field in the table as false. See image of how i have done this (update query not working). I then use the code:
Code:
Dim dbs As DAO.Database
Set dbs = CurrentDb
dbs.Execute ("Qry_AllowReprints")
I keep getting an erorr code come up saying "run time error 3061 too few parameters. expected 1". THe field names match the table so i cant understand what i have done wrong.