i have the following code behind a command button on my main_form - 
am trying to delete records based on SSN from multiple tables - the 
connect string that i use is also used to get nextval from this same 
oracle database, so i know that's correct - not sure what i'm doing 
wrong here...the records are obviously not deleted even though the 
sql string looks correct - 

MsgBox "Warning - this will Delete all related records in the 
database for " & FIRSTNAME & "  " & MINAME & "  " & LASTNAME & " " & 
SSN

Dim mydatabase As DAO.Database
Dim myquerydef As DAO.QueryDef
Dim sqlstr As String
Dim sqlssn As String

Set mydatabase = CurrentDb()
   
Set myquerydef = mydatabase.CreateQueryDef(memberq)
myquerydef.Connect 
= "ODBC;DSN=xxxxxx.xxxx.xx;UID=xxxxxx;PWD=xxxxxx;SERVER=ADM2"
sqlssn = "'" & SSN & "'" & ";"
sqlstr = "delete * from MEMBER where ssn=" & sqlssn
MsgBox sqlstr
myquerydef.SQL = sqlstr
myquerydef.Close
   
'Set myquerydef = mydatabase.CreateQueryDef(giftq)
'sqlstr = "delete from GIFT where ssn=" & sqlssn
'MsgBox "delete from GIFT"
'myquerydef.SQL = sqlstr
'myquerydef.Close
   
'Set myquerydef = mydatabase.CreateQueryDef(addrq)
'sqlstr = "delete from ADDR where ssn=" & sqlssn
'MsgBox "delete from ADDR"
'myquerydef.SQL = sqlstr
'myquerydef.Close





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to