Free Lessons
Fast Tips
Topic Index
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
Home > Forums > Access
Access Forum

Back to Access Forum

Not Sure What Im Looking For Upload Images   Link  
Glenn Kraniske 
4 months ago
Greetings All,
So I have a database where I'm tracking inventory of Fishing Poles.  Not having any issues but I'm like to take it a step further.  I have a conbo box (pull down box) that only has selectable options of YES or NO.  Here's what I want to happen, if the user clicks the NO option, nothing happens.  However if the user selects the YES option, I'd like another field to appear where a receipt number can be added.  Is there a way to do this?  I've been all over YouTube and I'm coming up dry.  Thanks so much in advance.

Adam Schwanz
4 months ago
Just make an AfterUpdate on the combo box with an if statement, if its yes make the text box visible, otherwise make the textbox not visible.
Richard Rost
4 months ago
I do something almost exactly like this in Access Developer 1. If you check a box that says "shipping address same as billing" then it copies over the address info to the other fields. You'd do the same thing, just change the .Visible property of the boxes you want to show/hide.
Glenn Kraniske
4 months ago
So I did what Adam said but I found an issue.  What's happening is if I click the YES option, the appropriate field appears.  But when I move to the next record the field is still visible even though the NO option is chosen.  Here's my code;

Private Sub FishingPoleSold_AfterUpdate()
    If Me.FishingPoleSold = "1" Then
    Me.SoldTo.Visible = True
    Me.SoldTo.Visible = False
End If
End Sub
Kevin Robertson
4 months ago
You will also need to use the OnCurrent Event
Glenn Kraniske
4 months ago
OnCurrentEvent?  Where do I put the code and am I using the same code?
Adam Schwanz
4 months ago
Go to the form properties, on current event. And yes you can use the same code.
Adam Schwanz
4 months ago

Richard Rost
4 months ago
Watch the video Kevin suggested
Glenn Kraniske
4 months ago
Got it!  Works great, thanks.  By the way, that video was exactly what I needed.
Richard Rost
4 months ago
If you liked that, consider the rest of the Developer series. You'd be surprised how many cool things you can do with Access once you know how. :)

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to Access Forum

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

5/16/2022Referential Integrity
5/15/2022Invoicing Member Discussion
5/12/2022Number Field Size
5/11/2022Create Word Document
5/11/2022Export to Word
5/10/2022On Click Event Timing
5/9/2022Invalid Use of Null
5/7/2022Event Handler
5/6/2022Database Title & Icon

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn