Hi sure this is easy if you know how! I have an unbound combo box (Combo9) on a form Fm_Data_Entry. I use a click button to open a pop up form from fm_data_entry which adds in another value to the source table of the unbound combo box, however, i can’t get it to update yhe combo again with the new value without actually closing the fm_data_entry and opening again. How can I get the unbound combo box to update the new table value without closing the form down?? Thanks folks.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Updating Unbound Combo Box based on pop up form
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Updating Unbound Combo Box based on pop up form
- This topic has 5 replies, 2 voices, and was last updated 13 years, 7 months ago.
Viewing 2 reply threadsAuthorReplies-
WSjohnhutchison
AskWoody Lounger -
WSM.Robb
AskWoody Lounger
-
WSjohnhutchison
AskWoody LoungerSeptember 28, 2011 at 7:47 am #1299969The form has an On Activate event.
Using the On Enter event will work I think, but it is requerying more often than needed.
-
WSM.Robb
AskWoody LoungerSeptember 28, 2011 at 8:57 am #1299977Hi John, thanks so much that’s working beautifully now. Can you also help with a similar issue –
I have a table detailing actions – simply an autonumber and listing possible actions people might wish to do with the db (e.g. open table, open form, run query, run report etc.). I want to attach this table to an unbound combo box on a switchboard form to allow people various options. I’ve got the combo box set up but not sure how I get the various actions to perform once the combo box listing is selected. think I need some sort of if statement on the AFter update box but VBAs not my strong point. Can you give me some pointers. It would be like
If Combo2 value = 1, then open form1
If Combo2 value = 2 then run report1 etc.Thanks for your help!
blitzy
WSjohnhutchison
AskWoody LoungerSeptember 28, 2011 at 4:52 pm #1300051I prefer to use a list box for that job, so users can see all the options, but a combo would work.
I would not use the After Update event, however, because they event will fire too easily. People will trigger actions without meaning too.
I would put a command button button next to the combo, so they need to take a deliberate action. But the choice is up to you..the code is the same wherever you put it.In the table you use, I also add an extra field. One field displays the action in plain english, the other has the actual name of the object you want to use: the table, form, report etc. My goal is that I should be able to add new items to the list, and have them work without needing to modify the code.
So you also need to be able tell what type of action is needed, from something in the table. If you use a consistent naming convention, you could tell the action by the name of the object.
e.g. table names begin with tbl, so if the first letters of the name are tbl, the action is to open a table. Query names begin with qry so if the first three letters of the object are qry, the action is to run a query.If you don’t use a consistent naming method, you would need another field to describe the action to be taken.
So my code would look something like this.
Code:Dim strObject as string If not isnull(me.combo2) then strObject = me.combo2 Select case left(strObject,3) Case “tbl” docmd.opentable strObject Case “qry” docmd.openquery strObject Case “frm” docmd.openForm strObject Case “rpt” docmd.openReport strObject, , acPreview Case else msgbox “I don’t know what todo.”,vbInformation end select else msgbox “Select an item from the list”, vbInformation end if
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Can’t make Opera my default browser
by
bmeacham
19 minutes ago -
Do not Fall For This Purdentix Scam (Awaiting moderation)
by
elizabethkaur56
2 hours, 52 minutes ago -
*Some settings are managed by your organization
by
rlowe44
12 hours, 51 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
15 hours, 5 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
15 hours, 30 minutes ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day ago -
AI slop
by
Susan Bradley
23 hours, 41 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 1 hour ago -
Two blank icons
by
CR2
11 hours, 20 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 10 hours ago -
End of 10
by
Alex5723
1 day, 13 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
11 hours, 16 minutes ago -
test post
by
gtd12345
1 day, 19 hours ago -
Privacy and the Real ID
by
Susan Bradley
1 day, 9 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
1 day, 1 hour ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 23 hours ago -
Upgrading from Win 10
by
WSjcgc50
11 hours, 26 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
14 hours, 59 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 days, 15 hours ago -
The story of Windows Longhorn
by
Cybertooth
2 days, 3 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days, 17 hours ago -
Are manuals extinct?
by
Susan Bradley
2 hours, 57 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 days, 2 hours ago -
Network Issue
by
Casey H
2 days, 13 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
3 days, 14 hours ago -
May 2025 Office non-Security updates
by
PKCano
3 days, 14 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
3 days, 16 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days, 17 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 19 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 19 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.