Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-09-2012, 12:03 PM   #1
Pavczech
Newly Registered User
 
Join Date: Jul 2012
Posts: 41
Thanks: 7
Thanked 0 Times in 0 Posts
Pavczech is on a distinguished road
button to insert text

Hello
I have form with text box called "Month"
I have button "Jan";"Feb" etc.

I could do with when I press "Jan" button it will focuse on the "Month" textbox and enters text "January" in the text box.

This should be simple but I not able to figure it out

Thanks very much

Pavczech is offline   Reply With Quote
Old 08-09-2012, 12:15 PM   #2
bob fitz
AWF VIP
 
Join Date: May 2011
Location: Essex England
Posts: 3,489
Thanks: 50
Thanked 678 Times in 661 Posts
bob fitz has a spectacular aura about bob fitz has a spectacular aura about bob fitz has a spectacular aura about
Re: button to insert text

You could try using the code below
Code:
Me.Month.SetFocus
Me.Month = "January"
but using a combo box instead of a text box would save a lot of space on the form and you wouldn't need the code.
__________________
Bob Fitzpatrick
Microsoft Community Contributor Award (2011)
If this helped, please click the scales at the bottom left of this posting.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Many thanks.


I have never failed. I have found a thousand ways that do not work!
bob fitz is offline   Reply With Quote
The Following User Says Thank You to bob fitz For This Useful Post:
Pavczech (08-09-2012)
Old 08-09-2012, 01:28 PM   #3
Pavczech
Newly Registered User
 
Join Date: Jul 2012
Posts: 41
Thanks: 7
Thanked 0 Times in 0 Posts
Pavczech is on a distinguished road
Re: button to insert text

Great one
I know drop down would make it easy but It is for touch screen so probably easier to use my way.
Thanks

Pavczech is offline   Reply With Quote
Reply

Tags
button , insert , text , textbox , vba

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I insert a edit button into a form carlos.moyaq General 0 05-10-2012 09:05 AM
Command button to insert OLE Objects rookbird0234 Forms 5 07-20-2009 07:58 AM
insert into using command button jerry28ph Forms 15 01-20-2009 12:27 PM
insert dynamic text into static text ppoindexter Reports 2 12-11-2007 10:56 AM
insert object button? erkerns General 0 06-13-2003 11:43 AM




All times are GMT -8. The time now is 05:25 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