Solved

Parameter Value Popup Error

Posted on 2009-07-08
5
267 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

733 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