Selasa, 27 Maret 2012

RE: [MS_AccessPros] Too few parameters

 

No problem,

I'm usually just reading the posts to see what I can learn. It is a rare day when I can see and diagnose the issue before one of the more frequent contributors.

Bob Peterson


-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Agestha Hendra
Sent: Tuesday, March 27, 2012 11:30 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Bls: [MS_AccessPros] Too few parameters

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]



------------------------------------

Yahoo! Groups Links



__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar