 |
| Access VBA Discuss using VBA for Access programming. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 12th, 2006, 06:17 PM
|
|
Authorized User
|
|
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Event on record change
Hi all,
i am still new to access and VBA, so i might have missed the simplest thing... anyway
i am looking to have an event take place when the next or previous record is selected
i would like to do this without creating my own navigation buttons.
thought maybe a On DoCmd.GoToRecord , , acNext then do something
any help would be much appreciated
cheers
|
|

October 13th, 2006, 02:27 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
What exactly are you trying to do with the code? What events will trigger the code? Are you using a form, report or table? Etc.
mmcdonal
|
|

October 15th, 2006, 10:02 PM
|
|
Authorized User
|
|
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have a form that has option buttons on it, the options are Quote, Order, Site Visit and Dead Lead. i have a hidden field called Conversion which equals in text the option that is checked eg. Quote option is checked, conversion = "Quote". (This is all done by Code) The problem is when i select say the prvious record that had Order selected, Quote is now checked, though conversion field still says "Order"... So what i am trying to do is have an event when the previous record is selected Conversion field is checked and the relative option button is changed to match..
i hope this makes sence
|
|

October 18th, 2006, 07:33 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
You want to check the value of your field and change the availability of buttons using the ON CURRENT event.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

October 18th, 2006, 07:39 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Is this an option group? If so, these are radio buttons.
I would suggest putting a field in your table tied to the option group so that the option group can read the number of the option selected when you scroll to that record, and if you need some text, then you can do the conversion yourself based on the number value in the option field.
This way the option group will automatically read its proper value, and you won't have to code and recode for the text value.
mmcdonal
|
|

October 18th, 2006, 07:13 PM
|
|
Authorized User
|
|
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for all your help,
The ON CURRENT event seems to be working fine.
thanks again
|
|
 |