Computing.Net > Forums > Programming > Declaring Variables in VB 6.0

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Declaring Variables in VB 6.0

Reply to Message Icon

Name: charles solomon
Date: March 22, 2004 at 10:06:36 Pacific
OS: 98
CPU/Ram: 64mb
Comment:

I am writing a software program in VB 6.0 that accepts input from a user and stores it to an Access database - both text and numeric.

How do I declare the variables for these items. For instance, I have a Name text box called "txtFirstName". The program will accept an input of the first name from the user and store it to a database when the save button command is clicked?

Thanks,
charles



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: March 22, 2004 at 11:24:35 Pacific
Reply:

You don't need a variable for a text box or any other VB control.

You access the value stored in the textbox with txtFirstName.Text

You can copy the value of the test box to a string variable if you wish, but normally it isn't necessary.

Dim strFirstName as String

strFirstName = txtFirstName.text

Stuart


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Declaring Variables in VB 6.0

VB 6.0 Write datagrid in 4.0 www.computing.net/answers/programming/vb-60-write-datagrid-in-40/8630.html

Function in VB 6 www.computing.net/answers/programming/function-in-vb-6/9626.html

ADO Control in VB 6.0 www.computing.net/answers/programming/ado-control-in-vb-60/11361.html