Bob..
Thanx for the inspiration,,,i was googling and found the answer, i must to add semi colon symbols ',
it's to be like :
"WHERE ((([T_XPWD].UserName)='" & [Forms]![ZZ_TAMBAH USER]![Text0] & "'));"
Once again thanx..
Regards
Hendra
________________________________
Dari: Agestha Hendra <agesthahendra@ymail.com>
Kepada: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
Dikirim: Selasa, 27 Maret 2012 22:14
Judul: 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]
[Non-text portions of this message have been removed]
Selasa, 27 Maret 2012
Bls: [MS_AccessPros] Too few parameters
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar