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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with querydefs

Status
Not open for further replies.

slowface

Programmer
Jul 7, 2003
6
BE
hi,

does anyone know how to alter a query (pass-through) in VB code, so that it doesnt ask permission for changing records in my sql server? I know how to do it manually, but that setting seems to be destroyed everytime i change the query by using the Querydefs object.
Here is a sample of my code:

Set qdf = CurrentDb.QueryDefs("qry_pasShiftAan")
With qdf
.SQL = " ""sc_pr_pasShiftAan"" """ _
& Me!datumTxt & """ , """ _
& Me!ploegCombo & """ , """ _
& Me!machineTxt8 & """ , """ _
& Me!matrijsCombo8 & """ , """ _
& Me!caviteitenTxt8 & """ , """ _
& Me!shotsTxt8 & """ , """ _
& Me!loopurenTxt8 & """ , """ _
& Me!ctTxt8 & """ , """ _
& Me!zakkenTxt8 & """ , """ _
& Me!conveyerTxt8 & """ , """ _
& Me!commentaarTxt8 & """ , """ _
& Me!uitgespmatTxt8 & """"

End With
Set qdf = Nothing

when I execute this and run the query afterwards, I got folowing message:

"you are about to run a pass-through query that may modify data in your table.. blah blah..."

please help me get rid of this.
 
DoCmd.SetWarnings False

This will set warnings off. I am not sure it will catch that one but imagine it would.

Be sure and set it back on.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top