Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cosmetic Questions - MouseWheel, Buttons, etc...

Status
Not open for further replies.

slaman

Programmer
Jun 8, 2001
47
CA
Ok, I think I have gotten the structure of my database down perfectly. I just need to work on some cosmetic changes...

The first has got me confused. When a person uses the Mouse Wheel, I want the form to SCROLL through the page (just like in design view or in a subform) Instead, it scrolls through the various records in the database. I tried this:

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
DoCmd.CancelEvent
End Sub

but now all it does is create a new entry when I scroll... All I want is to be able to scroll through the page itself.

The second question is a bit more involved. I have a required field which has an OnExit event that prevents it being null or non-unique. However, if the user accidently focuses on this field and wants to quit, how do I let him press the "Quit" button (its a custom button I created) but still disallow him from focusing on anything else. I'm not sure if there is a way to do this is Access but I'm guessing it would involve some sort of If Event statement.

To rephrase what I'm trying to do for the second part:

I'm in a field, I press "Next Entry" instead of "Quit" by accident and now I am in the RequiredField. This field will not let me leave the field if it is null; which is what I want - however, I need some sort of escape which allows me to press the "Quit" button even though the RequiredField is null. I hope you can figure out what I'm trying to say - if not, post, and I will rephrase.
 
Set the CANCEL property of your Quit button to YES. This will discard any other changes to any other field on the form as well. Unless you code for it separately using the DIRTY property.

HTH

Dan
 
You have misinterpreted what I am asking. I already have code for the "Quit" button. The thing is I can't leave the "Corporation Name" field's focus without it checking to see if the field is blank. Any ideas people?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top