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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

record navigation jams when focus is on field with exit programming

Status
Not open for further replies.

PeterDuthie

Programmer
Mar 14, 2001
29
GB
I'm new to access programming so please forgive me if this is a stupid question.

I have a form with some fields which do some capitalizing on exit - e.g.

Private Sub Address_1_Exit(Cancel As Integer)
If Not gCapitalize Then Exit Sub
Me![Address 1].Value = StrConv(Me![Address 1].Value, vbProperCase)
End Sub

When the user tries to navigate to another record when the focus is on one of these fields the form sticks on the current record.

I've tried putting the code into various events but none work. Looks like I've missed something simple but i don't know what it is - any help much appreciated

Cheers,
Peter
 
Hi Peter,
Whats gCapitalize?
Why even bother to test if that's what I think you're doing... Let's just do it anyway!

Me.Address_1 = StrConv(Me.Address_1, vbProperCase)

and I might move it to the after update event, otherwise it runs anytime you're just "passing through". Hope that gets it going :) Gord
ghubbell@total.net
 
After Update event eh? I just tried it and it works good - thanks very much Gord.

The gCapitalize is irrelevant to my query and I should have taken it out. It is just a global set by a button on the form so that Capitalization can be switched on or off.

Cheers, and thanks again Gord,
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top