Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. hkaing79

    outputting similar values as 1 value

    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.
  2. hkaing79

    Grouping dates cause overlap

    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...
  3. hkaing79

    Joining two tables with unequal dates

    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...
  4. hkaing79

    Database lookup speed improvement

    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
  5. hkaing79

    Database lookup speed improvement

    Do you have a sample list of field a and b and what you'd like to capture?
  6. hkaing79

    SQL in Code: Stacking queries

    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...
  7. hkaing79

    SQL in Code: Stacking queries

    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.
  8. hkaing79

    dlookup

    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...
  9. hkaing79

    dlookup

    Also, I didn't quite understand what you're trying to do with the dlookup. I only corrected the syntax to the best of my knowledge.
  10. hkaing79

    dlookup

    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...
  11. hkaing79

    Tuning: combobox of tables

    WOW. Thanks to both of you. Much shorter coding.
  12. hkaing79

    Tuning: combobox of tables

    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 = ""...
  13. hkaing79

    insert into a table from a text field

    Any error messages? It should update your table.
  14. hkaing79

    insert into a table from a text field

    I would use a command button and the On_Click() event. CurrentDb.Execute "INSERT INTO OBJECT(as400narr) VALUES ('" & [Forms]![objQry1]![text35] & "')
  15. hkaing79

    insert into a table from a text field

    You can use the SQL statement Insert. CurrentDB.Execute "INSERT INTO table (as400narr) VALUES ('" & txtField & "')
  16. hkaing79

    report which lists names like a phone book

    Create a report with name and last name. Go to Page Setup -> Columns, and set the columns to the number of columns you want per page.
  17. hkaing79

    I'm Stumpped

    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...
  18. hkaing79

    How many is too many

    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...
  19. hkaing79

    Command Button to both Open and Close

    docmd.close docmd.openform("form name") You can also hide your switchboard by toggling the visible property.

Part and Inventory Search

Back
Top