I am trying to run a query that when you click on it, it shows any due dates for inspections test to appear for the month your in. E.g. I want to know all the inspections tests that are due in June. I have the following code but it doesn’t seem to work. It will show some of the tests due but...
Hi All,
I have a template that I want to protect the header and bookmarks but I want to allow the user to fill in the body text of the document in. I have tried using tools>protect document>forms, it protects the header but not the bookmark and you can't edit the body text.
I have also tried...
Hi all,
Thanks for all your help, i've managed to get it working using the followng code for date criteria:
'Build criteria for Date due for Beginning / End Date
If IsNull(Me.txtbegdate.Value) Then
If IsNull(Me.txtenddate.Value) Then
dteDate_Due = "= #"
Else...
I declared it as a Variant & when i typed:
Beginning Date: 10/1/2004
End Date: 10/30/2004
I got an error msg:
'Data Type mismatch in criteria expression'
However when I typed just
Beginning date: 10/1/2004
It returned all records.
Michelle
I get the error in :
'Build criteria for Date due for Beginning Date
If IsNull(Me.txtbegdate.Value) Then
Date_Due = "Like '*'"
Else
Date_Due = "='" & Me.txtbegdate.Value & "'"
End If
Hi all,
I'm trying to write some VB code in Access 2002, the user selects data using a form & when they hit ok it brings up a report displaying all the records that match.
The form has three combo boxes & two text boxes.
Commercial (combo)
Customer (Combo)
Status (combo)
Beginning Date (txt)...
I've made it work.
I made a new query & used SQL to write the code NOT the design view. When I used the design view it replicated the same line loads of times, so it was very hard to see anything in the SQL view. Thats why I thought it was best to start again.
[code]
SELECT [Tender...
PHV,
I said it didn't make any difference it still didn't rerurn records matching all the criteria selected. It returned all the records matching the date & that was it. I hope this explains??
Michelle
This is what my SQL looks like, thats why I tried to split it up to make it more manageble.
[code]SELECT [Tender Detail].[Tender Number], [Tender Detail].Commercial, [Tender Detail].[Business Development Staff], [Tender Detail].Customer, [Tender Detail].ProductDescription, [Tender Detail].[Date...
When i posted my SQL I split it up to make it clearer to see & therefore delted the AND & =. Sorry about that! Tender detail is the table.
Here is an example some input & explanation.
The form has four combo boxes & two text boxes.
Business Development (Combo)
Commercial (combo)
Customer...
when you use a wizard to build the criteria & use 'like' it puts that in. However if you dont use the wizard to build the criteria it doesn't always work properly.
Michelle
Hi,
Here is my SQL.I have have included nulls because i want the user to have the option not to select all of the categories.
[code]SELECT [Tender Detail].[Tender Number], [Tender Detail].Commercial, [Tender Detail].[Business Development Staff], [Tender Detail].Customer, [Tender...
I have written a query In Access 2002 that runs off a form. The user selectis options from combo boxes and also can specify the date range of the records that are displayed.
The query worked until I added the option to search between two dates. Now the query ignores the other options the user...
Hi all,
Have been trying to figure out whats going worng with the database. still think its something to do with the business development staff. i dont know if there is something in VB code that doesn't like any of the words?? i've tried using various combinations e.g. 'businss', 'business...
Hi,
Thanks for all your help! It came up with no errors. I think its something to do with the business development combo box as when i taken it away it works fine. i've also added a different combo box & that worked fine too.
Michelle
Hi all,
Have run into difficulty again, I have added another combo box 'Business Development',when i run my form now it doesn't display all the information that matches the search criteria.I know there are more records that should match the criteria, i don't understand why it brings up some...
Thanks for all your suggestions. I've got it working, it was the AND. I have also changed the spacing. I've checked it sooo many times can't believe I missed it! Thanks anyway.
Michelle
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.