-
WSladygnome
AskWoody LoungerIt is under the Department Number, Department number is the bound column.
Thanks
-
WSladygnome
AskWoody LoungerHi right back fellow Texan.
How ’bout that? It does run. To my eye doesn’t look a hair different than what I typed from Wendell’s original reply. But Hey! The machine knows, I don’t.
However, as I suspected, it is showing all Departments in the selected Account range. Still no ability to choose a specific Department.
Hmmph– I wonder if I could select a department on the form then run the query from the command button I created awhile back??
Well the Query runs anyway. Thanks a bunch podner. -
WSladygnome
AskWoody LoungerThe RowSource for my Combo Box reads SELECT[Departments].[Department number],[Departments].[Department name]FROM[Departments;
Departments is a table that has at this point about 20 departments with associated numbers. When I get this to work, I will finish filling it.
I’m linked to some Read Only files. Plus the information I work with is considered “confidential”.
Let me think about this a bit. I may be able to create a “dummy” base that has no real information, but is set up like my database.
Thanks again
-
WSladygnome
AskWoody LoungerHere is what I’m getting when I try to reference the Combo Box in the Query
Forms![Find Departments]!Combo0.Column(0)
Undefined function Forms!(etc) Column’ in expression.
Forms![Find Departments]!Combo0
Treats this as a parameter – automatically adding [ ] around Forms! and Combo0I’m not sure this method will have the result I want, even if I get it to work. I looks to me like it would just pick up whatever value is currently in the column. No selection ability. Am I wrong??
The closest I’ve gotten to what I need is the control button on the form. For this morning, I had the Macro open the form – selected my department (after making the dept number visible), and then ran the query from the control button.
Since the form was open, I could then type in the correct Department number. On closing the query, the Macro continued to completion.My supervisor was not unhappy with this. It is much better than dragging out the manual to look up the Department number. As I said — really close.
How do I do this?? It looks like it would have exactly the result I want.
-
WSladygnome
AskWoody LoungerForms![Find Departments]!Combo0.dept-nbr.
I guess this represents complete confusion. I don’t know VB. I thought I was copying Pat’s solution. Except substituting the name of the column. The one I want would be column 0 per your explanation.
I have no idea how to do this. — I have changed the name of the column to Department number.
I do not know Visual Basic. I mean I REALLY REALLY do not know it. Please be patient with me.
Thank you for your interest
-
WSladygnome
AskWoody LoungerThis looks very similar to Wendell’s original reply, which just resulted in the column being skipped. Curious, because that solution is exactly what Access help says will work. Maybe I’m just typing it wrong. Yours is a bit different, I will try it.
Dummy didn’t name her Combo Box, so it is called Combo0. The column that the Department number is in is dept-nbr.
So I’m writing this as Forms![Find Departments]!Combo0.dept-nbr.
We shall see. -
WSladygnome
AskWoody LoungerThis gets me closer. Much closer. In fact, if push comes to shove, this will work. I am frustrated though. I really want the Department number to be automatically entered into the criteria for the Query. I was expecting something like the old TAKE, PUT commands from Basic. Essentially TAKE value from Here-PUT value There. Doesn’t exist in Visual Basic?
-
WSladygnome
AskWoody Lounger<>
No. It will always be either a single account. (Which can be accomplished by typing the same beginning and ending account), or a range of accounts.
Sometimes we will require the entire range, regardless of what Department the account is assigned to. Sometimes we will require only the accounts, within the range, that are assigned to a specific Department.<>
Actually, yes, and quite beautifully.
The thing is, we have over a hundred Departments. Rather than having to drag out the list and look up the number before typing it in, my Supervisor wants to be able to select from a list -by name- of Departments and have the appropriate number inserted into the Query. The reason I cannot use Department Name directly is that the Read Only Data Base I link to for Account numbers has them assigned by Department Number only.
Thanks for your interest. -
WSladygnome
AskWoody LoungerOkay, let me start from scratch here. What the original request from my Supervisor was. Where I’ve gotten with it, and what he wants now. I may be off on a totally irrelevant track.
Original request:
“Build a Query that will compute the MTDC for an account.” ( MTDCis made up of specific expense codes)
Did That.
“Can I request a range of accounts?”
Changed to a Paremeter Query by putting Between [Type the beginning Account] and [Type the ending account] in the criteria for the account number
” We need to be able to request a specific Department as well”
Did this with help from this site. At this point the Department number has the crieria [Type Department number] or [Type Department number] IsNull.
Thought I was through. This does what is needed quite efficiently, and I got it to work in a Macro that exports the results into Excel.Now —
” I would rather not have to look up the account number each time. Can we have a list of Departments to choose from?”Based on the way Access help described a combo box, I thought that was what I needed. I have created a table of Department names and associated Department numbers. The Department number is the primary field. Then I created a Form with a combo box with two fields. Department number is the bound field, Department name is all that shows in the drop down list.
What I need this to do is insert the department number into the Query criteria upon selection of the Department name. As long as I’m asking, it also needs to select all departments within the range if there is no Department selected.
If this is not the way to accomplish my goal, any guidance would be appreciated.
-
WSladygnome
AskWoody LoungerTyping this into criteria doesn’t result in a dialog box of any kind. It just skips that field on the Table the the Query creates.
Maybe I need to elaborate. This combo box doesn’t appear to do anything at this point. The form comes up, click the arrow and you get a list of names. Choosing a name — does nothing.
Sorry to be such a know-nothing. -
WSladygnome
AskWoody LoungerThanks Wendell, I will give this a try right away.
-
WSladygnome
AskWoody LoungerOh, I’m going to LOVE this site. It does exactly what I wanted
![]() |
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 |

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
-
No HP software folders
by
fpefpe
1 hour, 15 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
1 hour, 37 minutes ago -
Stay connected anywhere
by
Peter Deegan
1 hour, 30 minutes ago -
Copilot, under the table
by
Will Fastie
3 hours, 14 minutes ago -
The Windows experience
by
Will Fastie
7 hours, 44 minutes ago -
A tale of two operating systems
by
Susan Bradley
55 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
13 hours, 4 minutes ago -
Where’s the cache today?
by
Up2you2
1 day, 4 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
21 hours, 10 minutes ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
1 hour, 36 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 5 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
1 day, 21 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
1 day, 21 hours ago -
regarding april update and may update
by
heybengbeng
1 day, 23 hours ago -
MS Passkey
by
pmruzicka
1 day, 1 hour ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 6 hours ago -
*Some settings are managed by your organization
by
rlowe44
1 day, 17 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 5 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 1 hour ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
3 days, 10 hours ago -
AI slop
by
Susan Bradley
1 day, 4 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
3 days, 11 hours ago -
Two blank icons
by
CR2
19 hours, 59 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
21 hours, 57 minutes ago -
End of 10
by
Alex5723
3 days, 23 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
2 days, 21 hours ago -
test post
by
gtd12345
4 days, 5 hours ago -
Privacy and the Real ID
by
Susan Bradley
3 days, 19 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
1 day, 21 hours ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
4 days, 9 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.