Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query with combo box data

Status
Not open for further replies.

onefootout

Technical User
Oct 23, 2007
42
US
Hi there, I have a feeling I'm missing something quite obvious here.

I've got a simple update query that I'd like to use a form to control. There's a combo box on the form with days of the week(taken from a table), and a button that runs this query.

UPDATE __updateweday
SET weekendday = [forms]![__weekendday]![pickday]
WHERE custid=not null;


When I set the [pickday] as a combo box, it doesn't update. When I set it to a regular textbox and run it, it works fine.

How do I get it to update with the users choice from a combo box?

I checked the FAQ's but they all seemed way too complicated or were solutions for multiple selections. I will only ever need to pick one day of the week.

Thanks! :)

 
Does it throw an error or just not update?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Replace this:
WHERE custid=not null
with this:
WHERE custid IS not null

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks guys!

I changed my control to a list box, and all is well.

Maybe I just messed something up with naming, or I could have misspelled the first time.

/shrug [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top