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
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