473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VBA Code to accept value from form

Hi,

I have a form with a dropdown box that has years 2000 - 2030. I am trying to write a vba code to accept the year selected on the form.
Please help me with the code to accept data from a from.

Thanks
Jan 23 '08 #1
4 1741
missinglinq
3,532 Expert 2GB
Where YearTextbox is the control to hold the year selected:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YearComboBox_AfterUpdate() 
  2.   Me.YearTextbox = Me.YearComboBox
  3. End Sub
  4.  
Linq ;0)>
Jan 23 '08 #2
Where YearTextbox is the control to hold the year selected:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YearComboBox_AfterUpdate() 
  2.   Me.YearTextbox = Me.YearComboBox
  3. End Sub
  4.  
Linq ;0)>

Thanks for the reply.

The name of my dropdown box is CBYr and the name of the button is Request Report. With these names what change do I need to make in your code to make it work?

Thanks
Jan 23 '08 #3
1. Private Sub CBYr _AfterUpdate()
2. Me.YearTextbox = Me.YearComboBox
3. End Sub


Where

Thanks for the reply.

The name of my dropdown box is CBYr and the name of the button is Request Report. With these names what change do I need to make in your code to make it work?

Thanks
Jan 28 '08 #4
1. Private Sub CBYr _AfterUpdate()
2. Me.YearTextbox = Me.CBYr
3. End Sub


Where CBYr will be your combo box and YearTextbox is assumed where you need the data to read.



Thanks for the reply.

The name of my dropdown box is CBYr and the name of the button is Request Report. With these names what change do I need to make in your code to make it work?

Thanks
Jan 28 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Yang Li Ke | last post by:
Hi I know that there is a meta tag function to get all meta tags from a url. I am searching for a similar function that would get all values of a form. something like : <form> <input...
1
by: Paul Oakfleet | last post by:
The script below will disable Submit button until user accept terms, and will redirect user to another page after clicking on Submit button. The script seems to work fine on my PC (Windows XP,...
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
0
by: George Hartas | last post by:
I am using Visual C# .NET 2003 to make a ComboBox accept both mouse and keyboard selection. For mouse selection code, I double-clicked ComboBox to get the default "comboBox1_SelectedIndexChanged"...
12
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport)...
6
by: Dan McCollick | last post by:
Hi All, I have a very small screen scrape application, that has a small problem. when I run the app and I have fiddler(an http tool to view what is being sent by the requests/responses,...
13
by: Kirk McDonald | last post by:
Say I have a database containing chunks of Python code. I already have a way to easily load, edit, and save them. What is slightly baffling to me is how I can effectively pass this code some...
6
by: Alfonso2968 | last post by:
Hello, If someone can help plz. I have searched everything and all I can find is how to drag and drop within a form from panel to panel. What I need to do is Drag an image from the desktop...
8
by: ahilar12 | last post by:
Hi experts, I have a form with many textboxes,listboxes in php.I have a edit button to edit the values in the form.once i click the edit button the existing values should be displayed so that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.