I think that I may have fixed it using the information in the KB you supplied. Nice finding. I've attached. Look at the query. I think that you may not have clearly understood the KB.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
ok I have a few more questions:
1st - I want to set the column widths that display on the datasheet that opens when I view all my database entries or view the search results.
I found the following code
which is supposed to set the column width to be the same as the largest text entry.Forms![FormName].ColumnWidth = -2
The site I got the code from says that we use it in the OnLoad event but I cannot see the datasheet itself in my vba code viewer.
Can someone explain how I can do this pls?
2nd - I want to lock the datasheets from being able to be edited by anyone when viewing but would also like to have a way to have an editable record as well - so an edit button on the main menu.
How can I do this - I have been searching for ages and cannot find anything to help me.
Alan,
Thanks for that, I have had a look at the database you attached and run some test searches however it is still returning the same incorrect search results as my original search criteria:
* When searching by volume it returns all results.
* When searching by title it returns the results that match the search string but also returns any empty rows as well.
* When searching by rating it also returns the relevant results PLUS any empty rows as well.
Alan,
Thanks for that, I have had a look at the database you attached and run some test searches however it is still returning the same incorrect search results as my original search criteria:
* When searching by volume it returns all results.
* When searching by title it returns the results that match the search string but also returns any empty rows as well.
* When searching by rating it also returns the relevant results PLUS any empty rows as well.
If you run some test searches on the last database that I attached I hope that you will find - as I did - that the search problems have been resolved.
All of my searches are now returning correct results.
Last edited by vampyr07au; 04-22-2011 at 03:11 AM. Reason: sorry for the duplicate post
this thread is now complete and all issues solved. I ended up using the following code for the search button:
Hopefully this might help someone else.Private Sub Command7_Click() Dim strCriteria As String If Len(Me.Volume & vbNullString) > 0 Then strCriteria = strCriteria & "[Volume] = " & Me.Volume & " AND " End If If Len(Me.Title & vbNullString) > 0 Then strCriteria = strCriteria & "[Movie Title] LIKE '*" & Me.Title & "*' AND " End If If Len(Me.Rating & vbNullString) > 0 Then strCriteria = strCriteria & "[Rating] = '" & Me.Rating & "' AND " End If If Len(strCriteria) < 1 Then MsgBox ("Please enter search criteria before attempting to search the database") Else strCriteria = Left(strCriteria, Len(strCriteria) - 5) If DCount("*", "search", strCriteria) = 0 Then MsgBox "No movies matching your search. Please refine your search and try again." Exit Sub Else DoCmd.OpenForm "search results" End If End If End Sub
All the "like" criteria that allow the searches to be done with parial entries are found in the query.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks