Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Parameter Value Popup Error

Posted on 2009-07-08
5
Medium Priority
?
274 Views
Last Modified: 2013-11-28
I keep getting this popup when I run the form asking me to enter the parameter value for the field. Attached is a screenshot of the pop-up and the setting for the textBox.
Dim arName As String
Dim enName As String
Dim box As String
Dim landl As String
Dim mob As String
 
Text1.SetFocus
arName = Text1.Text
 
Text3.SetFocus
enName = Text3.Text
 
DoCmd.RunSQL "INSERT INTO Owner(NameAr, NameEn) VALUES (" & arName & ", " & enName & ");"

Open in new window

ScreenHunter-01-Jul.-08-11.01.jpg
ScreenHunter-02-Jul.-08-11.02.jpg
ScreenHunter-03-Jul.-08-11.02.jpg
ScreenHunter-04-Jul.-08-11.02.jpg
0
Comment
Question by:MariamAlsowaidi
5 Comments
 
LVL 46

Accepted Solution

by:
tbsgadi earned 1000 total points
ID: 24801620
RunSQL "INSERT INTO Owner(NameAr, NameEn) VALUES ("" & arName & "", "" & enName & "");"
0
 

Author Comment

by:MariamAlsowaidi
ID: 24801646
Thanks, that worked
But for the future, why does that happen?
0
 
LVL 31

Expert Comment

by:hnasr
ID: 24801648
Look for ArabicName in your code.  Check if it is entered as a criteria or an unknown field in a query.
0
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24801662
If you have strings as opposed to numbers you need to double up the quotations.
0
 
LVL 4

Expert Comment

by:Nicolaze
ID: 24801667
Replace your last code line with the following - You can copy / paste: (That will have the effect of surrounding arName and enName by a single quote)

DoCmd.RunSQL "INSERT INTO Owner(NameAr, NameEn) VALUES ('" & arName & "', '" & enName & "');"
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question