Hendra-
Try this:
strSql = "SELECT [T_XCEK PEG].IDPeg_Source " & vbCrLf & _
"FROM [T_XCEK PEG] " & vbCrLf & _
"WHERE ((([T_XCEK PEG].IDPeg_Source)= '" & _
[Forms]![1_DATA PEGAWAI]![IDPeg_Source] & "'));"
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----------------------------------
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Agestha Hendra
Sent: Tuesday, March 27, 2012 5:14 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Bls: [MS_AccessPros] Too few parameters
Thanx Bob...
Yes... IDPegSource is a number, and UserName is text ...
I have tried the code but it still got the same erorr....
Regards
Hendra
________________________________
Dari: Robert Peterson <bob@alternatefinishing.com>
Kepada: MS_Access_Professionals@yahoogroups.com
Dikirim: Selasa, 27 Maret 2012 21:30
Judul: RE: [MS_AccessPros] Too few parameters
IDPegSource is a number?
UserName is text?
Try this
"WHERE [T_XPWD].UserName=" &""& [Forms]![ZZ_TAMBAH USER]![Text0] &
""&";"
Need to wrap the textbox value in quotes.
Bob Peterson
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
agesthahendra@ymail.com
Sent: Tuesday, March 27, 2012 10:16 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Too few parameters
Hi Everyone....
I succesfully ran these codes in a form :
Dim db As Database
Dim rs As DAO.Recordset
Dim strSql As String
Set db = CurrentDb()
strSql = "SELECT [T_XCEK PEG].IDPeg_Source " & vbCrLf & _
"FROM [T_XCEK PEG] " & vbCrLf & _
"WHERE ((([T_XCEK PEG].IDPeg_Source)=" & [Forms]![1_DATA
PEGAWAI]![IDPeg_Source] & "));"
Set rs = db.OpenRecordset(strSql)
' Bla bla bla...
Then i modified it and assign it on control on other form (diffrent
Table Source):
Dim db As Database
Dim rs As DAO.Recordset
Dim strSql As String
Set db = CurrentDb()
strSql = "SELECT [T_XPWD].UserName " & vbCrLf & _
"FROM [T_XPWD] " & vbCrLf & _
"WHERE ((([T_XPWD].UserName)=" & [Forms]![ZZ_TAMBAH
USER]![Text0] & "));"
Set rs = db.OpenRecordset(strSql)
' Bla bla bla
but it gives eroor : Too few parameters,,, Please give me direction
where the mistake is, they both codes look similiar to me..
Any explanation would be very appreciated
Regards
Hendra
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Selasa, 27 Maret 2012
RE: [MS_AccessPros] Too few parameters
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar