Running an update query from list box multiple selections

coline

New Member
Joined
Apr 18, 2003
Messages
37
Hi, I would like to do data entry for several records that appear in the same table (and usually only appear one at a time on a form). I am thinking that I could dispaly the relevant records in a list box and then run an update query for those items selected in the list box by the user, but I'm not quite sure how to set this up. I'd appreciate your comments on whether this is a good plan, and if so, some pointers on how to set up an update query to run off listbox selections.

Thanks in advance,

Coline
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
What do you want to update?

You could have the listbox, and then below a number unbound textboxs with the info that is to be updated.

Each time a record is selected in the Listbox insert the current info for the record into the textboxs. The user can then change the data as wanted.

Then to update the record have a Command button that runs an update query.

e.g DoCmd.RunSQL ("UPDATE Table1 SET Table1.[Value]=" & v & " Where Table1.ID=" & i)
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,309
Members
451,696
Latest member
Senthil Murugan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top