If there is no consistent rule, you can manually group them by creating a separate table.
Name | Group_Name
awbz | awbz
awbz (GGZ) OB)DAG | awbz
awbz (GGZ) OB)DAG + OB-ALS | awbz
You just have to be sure that you're capturing all the names and grouping them.
I have a table with tblPrice having fields:
StartDate ProductID Price
1/1/06 1 $10
1/2/06 1 $10
1/3/06 1 $5
1/4/06 1 $10
Is it possible to query this table so the result would look like:
ProductID Price MinDate MaxDate
1...
I have two tables:
Table1: Product, SaleDate
Table2: Product, SaleDate, Price
I'd like to join the two tables on Product and the closest SaleDate. For example, Table1 has a SaleDate of 8/18/05, while Table2 has SaleDate's of 7/1/05, 8/1/05, and 9/1/05 for the same product. I'd like to match...
Geoff Franklin is a wise wise man. Listen to him.
Else, you're stuck with PHV's recommendation...something like...
WHERE field = "* 01" or something like that
Ah. I was assuming you just wanted to perform a series of action queries. To access the fields of the query, you'll need to create a recordset...or three...
I use DAO (make sure you have DAO 3.6 checked in Tools -> References)
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim strSQL as...
something like...
Function RunAllMyQueries()
CurrentDB.Execute "SQL Statement 1"
CurrentDB.Execute "SQL Statement 2"
CurrentDB.Execute "SQL Statement 3"
End
You can also create a macro using RunSQL. You can also run the Query itself in VB using DoCmd.OpenQuery QueryName.
You can't pop up a message through a query (not to my knowledge). You need to do this on the form.
In your form where you want to check your value, use the following...
If (condition) Then
MsgBox "Must Have State Mandated Application"
End If
I can't make out what you're trying to do with...
IIF(DLOOKUP([GRP_INVENTORY].St, "LKup_State", "Mandated Apps='Yes'),"Must Have State Mandated Application","")
I assumed [GRP_INVENTORY].St is a field in the query, LKup_State is the name of the lookup table.
Just as a note, there's no msgbox to pop up a message. Also, you wanted a pop-up...
Just curious if there are more efficient ways of going about this. I would like to populate a combobox with a list of all the tables in the database.
Function AllTables()
Dim db As Database
Dim tbl As TableDef
Dim strTable As String
Set db = CurrentDb()
strTable = ""...
I would create one query for OnDate and one query for OffDate. Then match their date.
Query 1 Query2
100 2/1/04 100 2/13/04
101 2/13/04 101 2/1/05
But, what if two or more vehicles were exchanged? For example
100 1/1/05 1/2/05
101 1/1/05 1/2/05
102 1/2/05 1/3/05
103 1/2/05 1/3/05...
I don't think there is a limit. It just takes a matter of time processing all those queries.
I consolidated all my queries in one report. If I had stuck with building queries, I'd say I would've had to maintain well over 50. It takes about 5 minutes to complete. The advantage is I don't...
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.