Just a note to anyone reading this thread.
I had exactly the same problem a number of times and it turned out to be a Memo field in all cases.
I would avoid using them if you can get away with it.
You need to remove the " at the end of your first criteria and remove the " after the AND for the second criteria. The AND is part if the string. The way you are using it is as a boolean operator.
Hope this helps.
There may be a simple answer to this but here is what I'd do.
Create a global module and add the following code -
Public Function GetMyFormat(dblValue as Double) as Double
Dim lngValue As Long
lngValue = CLng(dblValue)
If (dblValue-lngValue)>0 Then...
The only way you can achieve the results you are after is if you place a relation field between T2 and T3. You give an example of 2 records in T2 and 2 records in T3 and show your output as 1 record relating to the other. Yet you also say that there can be 5 records in one table and 3 records in...
If you are using Access 2000, then MyRS will probably refer to an ADO Recordset. MyDB.OpenRecordset will return a DAO recordset. What you need to do is declare your recordset to be a DAO Recordset - i.e.
Dim MyRS As DAO.Recordset
Hi Kevin,
Your reply highlighted what I was driving at (but, as usual, I didn't explain myself good enough). I'll have another go.
You gave an example with three technicians, using three groups of fields in your table for each technician. But you stated that there could be one or five. How...
Your table design is the problem here. When designing a table, it is best to think of it as representing a single entity. With your table, to find out how many jobs Mike has worked on, you have to analyse three seperate fields in one table. Your design should be-
JobID, Tech, TechNotes...
Place a field in your query that is made up of the following-
Selection: Format([Year],"yyyy") & Format([Period],"00")
Place the criteria for this field as-
Between (forms!yourformname!cblyearfrom & forms!yourformname!cblperiodfrom) And...
Why not put a TextBox on your control that is visible only when there are no items in your combobox.
The Property Get to get your value could then check the visibilty of the TextBox to determine whether to return the value from it or the combobox.
You need to set a reference to the DAO object library.
In a code module, goto menu item Tools-->References and scroll down to the Microsoft DAO Object Library and check it.
Should compile fine.
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.