Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2009-05-05 : 14:28:28
|
Xerx' here. Not sure where this one belongs. My last post was in MS Access (where I answered my own question! Do I get a veterans discount or points for that?), but alas I simply can't answer this one. A search of the forums usually turns up the information I seek, however this instance has turned up nothing, so I'm at your mercy...Here is my code....Private Sub Command45_Click()' here should be an IF EXISTS or CLOSE? <<<<<-----DoCmd.RunSQL "SELECT OPA.[Rec Type], OPA.Function, OPA.RID, OPA.[Process Dt], OPA.[Ref IHCP Num], OPA.[Prov IHCP Num], OPA.[Admit Dt], OPA.[Thru Dt], OPA.[Diag Cd 1], OPA.[Diag Cd 2], OPA.[Total Units], OPA.[Tot Appvd Units], OPA.[Tot Denied Units], OPA.[Status Reason], OPA.[Patient Status], OPA.POS, OPA.[Proc Code], OPA.[PA Auth Num], OPA.[Line Num], OPA.[Ref NPI], OPA.[Prov NPI] INTO TEMPOPA " + _"FROM OPA" Call fnWriteFile("TEMPOPA") End Suband therein lies my question...how do I make a determination of existence/closing so the following docmd.runSQL will not error?Thanks for your assistance!Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL & VB obviously! |
|
whitefang
Enterprise-Level Plonker Who's Not Wrong
272 Posts |
Posted - 2009-05-08 : 09:51:34
|
On Error GoTo ErrorLabelErrorLabel: MsgBox Err.Description Exit Sub |
|
|
|
|
|
|
|