Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-13-2019, 06:26 AM   #1
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
auto command button

How would I after update in a field press a command button with vba?

Basically, after the field is updated, I manually have to click the command button. Would like it to happen automatically.

Thanks...

kitty77 is offline   Reply With Quote
Old 09-13-2019, 06:40 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,489
Thanks: 50
Thanked 1,038 Times in 1,019 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: auto command button

Hi. You could just "call" it. For example:


Call ButtonName_Click()


Hope it helps...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 09-13-2019, 06:55 AM   #3
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: auto command button

Will give that a try. BTW, your website is VERY helpful. Lots of good stuff!

kitty77 is offline   Reply With Quote
Old 09-13-2019, 07:20 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,489
Thanks: 50
Thanked 1,038 Times in 1,019 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: auto command button

Quote:
Originally Posted by kitty77 View Post
Will give that a try. BTW, your website is VERY helpful. Lots of good stuff!
Hi. Thanks! Please let us know how it goes.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 09-13-2019, 07:58 AM   #5
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,020
Thanks: 20
Thanked 381 Times in 374 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: auto command button

For myself, if I have code that will be called from more than one place, I put it in its own SUB. I then reference that SUB any place I need to. This helps avoid the "Well, this button presses that button, which pushes those buttons" issues and helps you keep track of where you have code.
Mark_ is online now   Reply With Quote
Old 09-13-2019, 08:33 AM   #6
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: auto command button

Where can I learn about SUB's, examples, etc. I have not used them yet.

Thanks...
kitty77 is offline   Reply With Quote
Old 09-13-2019, 09:15 AM   #7
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,020
Thanks: 20
Thanked 381 Times in 374 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: auto command button

This link has a quick overview of using SUBs in VBA.


Mark_ is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Populate Fields when Command Button Clicked Cirrus Forms 8 10-05-2018 10:25 AM
Auto number with command button syedadnan Tables 18 01-31-2014 08:28 AM
Auto-Populate field from command button esskaykay Forms 5 02-10-2009 12:46 PM
Auto-populate fields in a form using a command button intozeefire Forms 0 03-23-2005 07:42 AM
Auto Fill text command button bacardi451 Forms 1 10-17-2002 05:06 PM




All times are GMT -8. The time now is 07:28 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World