By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,560 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,560 IT Pros & Developers. It's quick & easy.

Access Forms

P: 3
Hi I'm currently building a daabse in MS Access 2000, having not touched access for about 10 years. I need to conditionally hide / display a combobox (specfically a pop up calendar) depending on the answer to the previous combobox.

I only want the date box to be displayed if the answer to the previous field was 'Pass' currently I have this code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Field1_BeforeUpdate(Cancel As Integer)
  2.  
  3. If Me![Field1] = "Pass" Then
  4. Me![Field2].Visible = True
  5.  
  6. Else
  7. Me![Field2].Visible = False
  8. End If
  9. End Sub
  10.  
I've also set the visable format option to 'No' this works fine the first time the data is entered but if you look at the form again the field is hidden. I've got a feeling that the anser is simple but I'm still finding my feet in VB.

Thanks for any help

J

out of interest, I'm going to be building databases more often now would you guys / gals reccomend a book on Access or a book on VB? or both?
Aug 3 '07 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,382
You also need the code in the On Current event of the form.
As for books.. I use the Access help files, they're really good.
Aug 3 '07 #2

missinglinq
Expert 2.5K+
P: 3,532
First off, depending on how long your memory is, you might want to invest in an Access for Dummies type book. People may laugh, but one of the biggest problems we see here and on other forums is that the people posting questions don't know the names of the objects or even the most basic procedures, and so can't post a question/problem so that it's understandable. An hour or two paging thru one of these books will probably stir up memories from your previous experience and give you a good foundation. And as programming texts go, they're dirt cheap!

An excellent book I just came across is called Fixing Access Annoyances (O'Reilly Media, Inc.) by Phil Mitchell & Evan Callahan. Mitchell is the lead analyst/programmer for Harvard University and Medical School, and still manages to write in a very down to earth, understandable manner! This book is about 350 pages and is nicely indexed for quick referencing, and does exactly what it's name suggests, tells you how to avoid the many pitfalls and fix the aggravations caused by Access' quirkiness, and in the process develop and run better apps! It's a real steal at 19.99 USD.

And lastly, spend a few minutes everyday looking at the questions posted here and look at the tutorials our members have posted! You'll learn a lot, and before you know it, you might find yourself answering questions!

Welcome to TheScripts!

Linq ;0)>
Aug 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.