By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

updateqry for switchboard name

P: 23
I want users to be able to name the switchboard. I added a new field in the switchboard items table called name and changed the labels to txtboxs with a record source to name. If this isnull a form opens which allows the user to put a name into an unbound txtbox. When the form closes the values are transferred to the name txtbox on the switchboard. However, this only works for the first page of the switchboard. It has to be placed in all the command fields that = 0 for it to show on all the pages of the switchboard. I can't get an update qry to work - syntax problems. This and several other versions were put in the onclose event. Any suggestions are appreciated.
CurrentDb.Execute "UPDATE [Switchboard Items] SET WHERE [command]= 0 And [name] = " & Me![name] & "
Sep 19 '07 #1
Share this Question
Share on Google+
3 Replies


Scott Price
Expert 100+
P: 1,384
I want users to be able to name the switchboard. I added a new field in the switchboard items table called name and changed the labels to txtboxs with a record source to name. If this isnull a form opens which allows the user to put a name into an unbound txtbox. When the form closes the values are transferred to the name txtbox on the switchboard. However, this only works for the first page of the switchboard. It has to be placed in all the command fields that = 0 for it to show on all the pages of the switchboard. I can't get an update qry to work - syntax problems. This and several other versions were put in the onclose event. Any suggestions are appreciated.
CurrentDb.Execute "UPDATE [Switchboard Items] SET WHERE [command]= 0 And [name] = " & Me![name] & "
I'm not sure if I understand exactly what you are referring to, but I don't think an update query is what you need.

By Pages are you referring to tab controls on your switchboard form? What are the command fields you are referring to?

Regards,
Scott
Sep 22 '07 #2

FishVal
Expert 2.5K+
P: 2,653
Hi, alij.
  • nothing is being set in your query, check syntax
  • [command] field is not unique in [Switchboard Items] table, I suppose [name] too unless it is indexed with "No duplicates"; are you expecting the query to update multiple items?
Sep 22 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
See if this does what you want ...

CurrentDb.Execute "UPDATE [Switchboard Items] SET [name] = '" & Me![name] & "' WHERE [command]= 0
Sep 30 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.