Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access VBA help 1

Status
Not open for further replies.

scevbact

Technical User
Jan 3, 2013
12
0
0
US
Hi, I am trying to program a form in ACCESS and need some help with the following

1) The user selects a value from a drop down combo box
2) The value displayed in the combo box shows the description but not the code associated with the description. The combo box name is cmbCode
3) In a text box he enters a project number (random or new) that must be preceded by the code associated with the description in 2 above
4) The vba code includes a temp variable that stores a portion of the users input to the text box.
5) The code checks if the user has prefixed his entry with the appropriate code included in 1 above
6) If not, the program adjusts the entry to prefix the users entry with the correct code and concatenates with the portion extracted in 4 above

The code that I am using to write to a text box is

if routine is ="=cmbCode&"-"&strinput "(The name of the temp variable in 4 above)

It appears that the ampersands and Single and double quotes need a particular format. Could someone clarify, or correct.

Thanks
 
Hi,

Code:
="=cmbCode-" & strinput

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top