I assume you have three checkbox related to 3 fieldnames. You can create query based on the checkboxs like this
Dim mSqlText As String
mSqlText = "SELECT FieldA, FieldB, FieldC, FieldD FROM TableA WHERE "
IF Me.CheckBoxA = False Then mSqlText = mSqlText & "FieldA = "NY"...
'This is what I did to Run stored procedure "TEST"
'ALTER PROCEDURE "Test" (@YourName nvarchar(20), @YourPass nvarchar(10))
'INSERT INTO dbo.UserList (Name, Password)
'SELECT @YourName As Name, @YourPass As Password
'----------------------------------------------------------...
Just make a button and open the click event and try this code:
Private Sub buttonX_click()
Dim mSql As string
sSql = "UPDATE tablename SET columnnametoupdate = columnname1 + columnname2 WHERE columnnametoupdate <> columnname1 + columnname2"
DoCmd.RunSql mSql
End Sub
Is that what you...
Why not create function to develop SQL Text and run it as Recourd source, in the form or at other form. It's only create WHERE clause based on the existing value 0f (text/combo)box.
Example:
Dim SdlA, SqlB As String
SqlA = "SELECT Assets.BarcodeNumber, Assets.AssetDescription...
With access XP as front end and MSSQL SERVER 2000 As Back End:
It not satisfying me using "DoCmd.OpenStoredProcedure" when Executing non-select SQL, and I still questioning the effectiveness of using ADO in VBA.
Is somebody know the best way?
Thank you
Thanks Claire
I already found that I made too much parameter so while I create the procedure to joint the functions I made mistake in writing the parameter structure.
For Bertrand, here I made the sample of Joining parameter function in stored procedure as I mean
Exp. I have two functions...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.