Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate access fields from oracle with script

Status
Not open for further replies.

mancusoj

MIS
Jul 18, 2003
5
0
0
US
I have oracle tables connected in a access application. I have three fields on one of the forms merchant name, merchant id and pidm. I am trying to have two fields(id and pidm)populated based on a combo box selection(merchant name). The code I have used in an afterupdate procedure is

Private Sub FZTVEND_MERCHANT_NAME_AfterUpdate()
SQL = "Select Saturn_Spriden.spriden_pidm as pidm, saturn_Spriden.spriden_id as id"
FROM "saturn_spriden.SPRIDEN_LAST_NAME = " & FZTVEND_MERCHANT_NAME.Value & "'"
Set R = CurrentDb.OpenRecordset(SQL)
R.MoveFirst
ID = R("ID")
PIDM = R("PIDM")
Set R = Nothing
End Sub
It will not populate the text boxes.
Any suggestion would be great. Thank you
 
Check the value of SQL. It seems to me that it's not evaluated to a valid sql statement. String literals in Oracle should be quoted by single quotes.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top