Have you tried building you SQL statement using IF statements? If you query is based on data entered on the form then you can use IF request.form("name") <> "" Then ... and add a add a line to the SQL statement sql=sql & "other criteria", building it as you go...
I had a similar problem and I created a new form and cut and pasted everything from the old to the new form (instead of importing) and the new form worked. I don't know if the problem was in the conversion. I didn't research it further because this worked.
Sorry, there were a few typos in the first piece of code I sent.
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim dbs
Dim rMST
Dim FN As String
Dim A() As String
Dim I As Integer
Set dbs = CurrentDb()
Set rMST = dbs.OpenRecordset("Select * from EnterTableNameHere Where...
My code is looking for a SPACE between values. You can replace the "," with " " and it will parse correctly. You can cut and paste the code behind the On_Click event of a button on any form, just change the "Command21" in the code with your button name.
I use this code behind a button:
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim dbs
Dim rMST
Dim FN As String
Dim A() As String
Dim I As Integer
Set dbs = CurrentDb()
Set rMST = dbs.OpenRecordset("Select * from EnterTableNameHere Where ([FullName] > ' ')")
Do...
It is a multi-table query. I use nested <CFOUTPUT>'s for the GROUP Function. If I use <CFOUTPUT query="UData" GROUP="CODE" >. I get one header record at the "CODE" level and multiple Detail records by nesting the <CFOUTPUT>'s.
My goal is to duplicate an existing Access Report. The first table has the basic information. The middle paragraph is just a small line with the address, city, state, etc. I'm using the nested <CFOUTPUT> to show the detail for each unit record. Taking out the style didn't help. If you want to...
I am grouping my output and when there are more than three detail records in the group the next group heading displays over the top of the previous line. If there are only three group records then it works fine. Anyone ever have this problem?
I haven't been able to find any sort of help or solution about granting group permission to a table without going through the security menu. Can I use the Owner property in the MYSYSOBJECTS? and if I do, how does system know if its a group or user permission?
I have a secure DB that has code to delete and then recreate a new table. When the table is recreated the owner is the current user and when another user with the same group permissions logs on, it will not let them delete and recreate this table.
Set tdf =...
I am using the following codes:
<CFQUERY name="SNNote" dbtype="ODBC" datasource="Afr">
Select * from Notes
Where
SNID =#NR#
</CFQUERY>
This works and I can display the data. However, when I try an update with:
<CFQUERY name="SNUpdNote"...
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.