I have a form for tracking inventory. I have macro buttons with part numbers on them that change the recordsource of one form to view all parts rather that create many forms.
What I want to do is, when the form comes up and there are no parts in stock, I have a control that says “NO STOCK”.
But the other controls are blank. I would like to be able to show the record source, which is a query named with the actual part number. So if I could show the record source, it would show the part number that we are out of in the form. I dont know if this can be done, but any help would be greatly appreciated. (Access 97) SR1
Thanks
Cary
![]() |
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 |
-
View Record Source in Form
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » View Record Source in Form
- This topic has 10 replies, 2 voices, and was last updated 24 years ago.
AuthorTopicWSCary
AskWoody LoungerMay 20, 2001 at 1:32 am #356224Viewing 0 reply threadsAuthorReplies-
WSJerryC
AskWoody Lounger -
WSCary
AskWoody LoungerMay 20, 2001 at 2:08 am #526789 -
WSJerryC
AskWoody Lounger -
WSCary
AskWoody LoungerMay 20, 2001 at 2:55 am #526794I have a query for eacn part number so it doesnt have to be typed in a parameter box. A command button on the menu form
runs a macro and changes the form record source to the correct query. So when the form opens and there is no record in the query, all controls come up blank in the form.
I want the part number to show even though there are no records.
Thanks for your help
Cary -
WSJerryC
AskWoody Lounger -
WSCary
AskWoody LoungerMay 20, 2001 at 5:15 pm #526823In this data base there are six part numbers. Each has four different lenghts and two colors. I have a query set up for each part number with each length. So there are 24 queries. I used [type color] parameter in each query to avoid making an additional 12 queries. You may ask why I didnt just use a [type part number] paremeter too. I wanted to make it easier one the user to just click one button and type in one color number instead of typing in (part number)(length) and (color). When the command button is clicked, it opens the form and it runs the set value command and uses the right query and the query only asks the user for the color number. But if there is no stock the form comes up and a control says “NO STOCK”, but since there is no record, it shows no part number so the user has to remember the correct (part number);(length) button she clicked. That’s why I would like it to show the part number.
Thanks again for trying to help
Cary -
WSJerryC
AskWoody LoungerMay 20, 2001 at 6:09 pm #526825ok i taking it that you have six different buttons for the part numbers
if this is correct
place an unbound textbox on the form
then on the onclick of the button put the part number in the text box
like this
text1 = “the part number”
the part number will stay there until you remove it or replace it with another number
also if you wanted you could make a list box for color and the user wouldn’t have to type that
let me know if any of this works for you -
WSJerryC
AskWoody LoungerMay 20, 2001 at 6:18 pm #526826i was just re reading your form setup
if you wanted you could place three listboxes or combo boxes in the form one for part number one for length and the other for color that way one query would work for all part numbers and and unbound textbox for each list or combo box would let you know all the information when the “no stock” came up
just a thought -
WSCary
AskWoody LoungerMay 20, 2001 at 11:00 pm #526843In the on click event of the command button that runs the macro it already has the name of the macro there. I tried to put it in other events but it just says unable to find “part number”. Even when put in quotes, it still thinks it is looking for a macro. I dont see how this would work anyway since the form is not even open at this point so the unbound text box in not even in existence yet. I guess this just can not be done. Thanks for trying to help though.
Cary -
WSJerryC
AskWoody LoungerMay 20, 2001 at 11:44 pm #526845yes it can be done
remove the macro from the on click event
now click on the three dot button at the left on the on click event then choose code builder
now enter the name of the unbound textbox like this
text1 = “part number”
hit enter and on the next line run your macro
docmd.RunMacro “macro name”
this will fill the text box with the part number and then run your macro
don’t give up this is easier than you think
it’s just a different way than you are use to
if you want send me a zipped db with this form in it and i will show you what i mean
if you want send to jwcurry@cafes.net
-
-
-
-
Viewing 0 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
-
Sometimes I wonder about these bots
by
Susan Bradley
2 hours, 11 minutes ago -
Does windows update component store “self heal”?
by
Mike Cross
8 hours, 15 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
9 hours, 15 minutes ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
8 hours, 41 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
5 hours, 11 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
11 hours, 57 minutes ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
11 hours, 59 minutes ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
33 minutes ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
20 hours, 6 minutes ago -
0Patch, where to begin
by
cassel23
14 hours, 8 minutes ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
1 day, 9 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
21 hours, 30 minutes ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
1 day, 18 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
1 day, 9 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
20 hours, 23 minutes ago -
Installer program can’t read my registry
by
Peobody
3 hours, 4 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
1 day, 7 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
1 day, 14 hours ago -
False error message from eMClient
by
WSSebastian42
2 days, 5 hours ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
2 days, 14 hours ago -
Office 2021 Perpetual for Mac
by
rebop2020
2 days, 15 hours ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
2 hours, 20 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
2 days, 19 hours ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
2 hours, 39 minutes ago -
Outdated Laptop
by
jdamkeene
3 days ago -
Updating Keepass2Android
by
CBFPD-Chief115
3 days, 6 hours ago -
Another big Microsoft layoff
by
Charlie
3 days, 5 hours ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
7 hours, 52 minutes ago -
May 2025 updates are out
by
Susan Bradley
9 hours, 34 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
3 days, 11 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.