The downside of my celebrity is that I cannot go anywhere in the world without being recognized. It is not enough for me to wear dark sunglasses and a wig. The wheelchair gives me away.
I am burning my brain up trying to do something I thought would be so simple that I must be the simple one – I want to use an InputBox in VBA 6.5 (in Access 2002) to accept a piece of information from the user of a form. I then want to use an SQL statement in the VBA to be able to insert the information into a table. I have tried every combination of single and double quotes, brackets and parenthesise around the variable “NewTestingActivity” in the SQL statement, but the best I can achieve is a prompt box to pop up with the Sub below. To your experienced eye it will be obvious what this novice is doing wrong…
Dim NewTestingActivity As String
Private Sub for_all_leas_Click() NewTestingActivity = InputBox("Please enter the name of the new Test Activity:", "New Test Activity") DoCmd.RunSQL "INSERT INTO TestingActivities (TestingActivityDescription) VALUES (NewTestingActivity);"
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.