Command Button to change code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need the code to make a command button go to a specific place in VB. The position would be on the form 'On Current' in my VB script. I would prefer a command button on click with code rather than editing the vb script manually. Can anyone help?
 
Ron

Too many terms I don't understand ... can you describe what you want to do
(not how)?
 
Jeff Hi, Thanks for your concern. I have code in a form when you open the form in design mode scroll the properties of the form to 'on current' d/click on on current and this then takes me to my VB script. The code tells my program how to calculate certain fields which I am able to do. I would prefera command button on the form to do the same. If I click on the command button it will then take me automatically into the above position. As at present I can manually change the code by going into the design mode, clicking on form, then on current, which then takes me to my VB script. I would like to short cut this with a command button. Jeff I hope this helps you if not come back to me. Thanks so much!
 
Jeff Hi, Thanks for you concern. I have a form. If I go to design and then open the form properties scroll to 'On Current' double click it takes me to VB script that I have written. I am then able to change code as I wish. To short cut this procedure I would like to place a command button in the form in view design, click on this button and be directed to the script in VB under 'On Current' so that I can change VB script without placing my form in design view. Jeff Hopes this helps and I look forward to your reply.
Ron.......
 
Jeff Hi, Thanks for you concern. I have a form. If I go to design and then open the form properties scroll to 'On Current' double click it takes me to VB script that I have written. I am then able to change code as I wish. To short cut this procedure I would like to place a command button in the form in view design, click on this button and be directed to the script in VB under 'On Current' so that I can change VB script without placing my form in design view. Jeff Hopes this helps and I look forward to your reply.
Ron.......
 
Ron

It may not be applicable in your situation, but I'm wondering why you'd need
to alter the code when your application is running?

Could you describe 'what' you want to accomplish, rather than 'how' you've
already approached it?
 
Hi Jeff, I have certain costs of goods which I placed in code and in some instances I need to change the prices, as i said I can do it manually but I would prefer a command button with code to take me there so that I can make changes.
eg of my code.
If [Dateofreport] >= DateValue("1/2/2004") Then [Costinstfee] = 85#
There are many more codes like the above.

Ron....
 
I think you'll find it far easier to keep your values and the dates they're
in force in a separate table.
Then you can just change the data in the table, and not have to mess with
the code.

HTH
- Turtle

Ron said:
Hi Jeff, I have certain costs of goods which I placed in code and in some
instances I need to change the prices, as i said I can do it manually but I
would prefer a command button with code to take me there so that I can make
changes.
eg of my code.
If [Dateofreport] >= DateValue("1/2/2004") Then [Costinstfee] = 85#
There are many more codes like the above.

Ron....



Jeff Boyce said:
Ron

It may not be applicable in your situation, but I'm wondering why you'd need
to alter the code when your application is running?

Could you describe 'what' you want to accomplish, rather than 'how' you've
already approached it?

--
More info, please ...

Jeff Boyce
<Access MVP>
 
Back
Top