Hi,
I have a query within vba, it querys my SQL server. Now the query works fine, but is there a way to stop the login box appearing, by setting the connection settings/logins/passwords within vba?
I normally use php, so this is all new to me. any help or pointers would be great.
Function Make_MIS_DATA_Table()
Dim MIS1 As String
MIS1 = "SELECT dbo_TurnOverDaily.Date, dbo_TurnOverDaily.Month, dbo_TurnOverDaily.InvTOver, dbo_TurnOverDaily.InvProf12, dbo_TurnOverDaily.InvProf8, dbo_TurnOverDaily.InvRealProf, dbo_TurnOverDaily.CNTOver, dbo_TurnOverDaily.CNProf12, dbo_TurnOverDaily.CNProf8, dbo_TurnOverDaily.CNRealProf, dbo_TurnOverDaily.NoOfInvs, dbo_TurnOverDaily.NoOfItems INTO MIS_Monthly_Data FROM dbo_TurnOverDaily WHERE (((dbo_TurnOverDaily.Month)=Format(Date(),'yymm')));"
DoCmd.SetWarnings warningsoff
DoCmd.RunSQL MIS1
DoCmd.SetWarnings warningson
End Function
I have a query within vba, it querys my SQL server. Now the query works fine, but is there a way to stop the login box appearing, by setting the connection settings/logins/passwords within vba?
I normally use php, so this is all new to me. any help or pointers would be great.
Function Make_MIS_DATA_Table()
Dim MIS1 As String
MIS1 = "SELECT dbo_TurnOverDaily.Date, dbo_TurnOverDaily.Month, dbo_TurnOverDaily.InvTOver, dbo_TurnOverDaily.InvProf12, dbo_TurnOverDaily.InvProf8, dbo_TurnOverDaily.InvRealProf, dbo_TurnOverDaily.CNTOver, dbo_TurnOverDaily.CNProf12, dbo_TurnOverDaily.CNProf8, dbo_TurnOverDaily.CNRealProf, dbo_TurnOverDaily.NoOfInvs, dbo_TurnOverDaily.NoOfItems INTO MIS_Monthly_Data FROM dbo_TurnOverDaily WHERE (((dbo_TurnOverDaily.Month)=Format(Date(),'yymm')));"
DoCmd.SetWarnings warningsoff
DoCmd.RunSQL MIS1
DoCmd.SetWarnings warningson
End Function