?
Solved

Parameter Value Popup Error

Posted on 2009-07-08
5
Medium Priority
?
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

770 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