Solved

Parameter Value Popup Error

Posted on 2009-07-08
5
263 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 250 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 30

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now