Search results

  1. J

    Show Results in a Form or a Table

    Hi, I have a list-box(Category) and a 'ok' button on the form. My OK button has the following [Event Procedure]: Private Sub OK_Click() Me.Visible = False DoCmd.RunSQL "Select [Barg Unit],[Medical Option],[Medical Coverage Tier] FROM RetireeCensus Group By [" & Category & "];" End...
  2. J

    Grouping Based On What's Selected In List Box

    I am thinking I can create a 'control' and then apply VBScript to the control like this: Private Sub OK_Click() Me.Visible = False DoCmd.RunSQL "Select [Department],[SSN],[Status] FROM TableA Group By [" & Category & "];" End Sub 'Where Category is the name of the list box Now the...
  3. J

    Grouping Based On What's Selected In List Box

    Hi, I have a form with 1 List Box. This list box contains the names(SSN, Department, Status) of the columns in TableA. The question is, can I create just ONE query statement, and base the GROUP BY on whichever field the user selects? For example, if a user choose Department, then the...
  4. J

    Compare Values of Columns Within The Same Query Table

    Thank you! I am such a newbie; i need to remember [qryDedparmDedetail].[Employer Actl] is not the same as "Employer Actl." Thanks for your time. Joe
  5. J

    Compare Values of Columns Within The Same Query Table

    Hi, I am trying to compare two columns' values within the same QUERY table, but I kept on getting the "Data type mismatch in criteria expression" error. What am I doing wrong? Here is my Select Query Statement: SELECT qryDedparmDedetail.EMP_ID, qryDedparmDedetail.[Employer Amt]...
  6. J

    Joining Tables, Group By Name, Select On...

    Hi I have 2 tables(tblA and tblB) and I want a query result(tblC) where ‘group by’ only one record per individual, with the total added together and the type starts with ‘01’. Below(tblA and tblB) are examples of the two table. TblC is the query result that I want. tblA...
  7. J

    Putting Row Values into Columns

    Great! This works! HOWEVER, of course I still have 3 records per individual. To solve this, i am assuming I would have to do a "Group By" SSN. When I do so, I get an error saying:"Data type mismatch in criteria expression." Here are my query codes: SELECT...
  8. J

    Query Issue

    Great! Thank you you guys!
  9. J

    Query Issue

    Hi, What's wrong with this code?: Employee:IIf(right(dedtype-Cd,1)='E'),'Employee','Null') I am entering this in the Query Design View window. MS Access error message says I have "the wrong number of argument." Thank you.
  10. J

    Putting Row Values into Columns

    Hi, I have been trying to figure this out for a long time. Any tips/helps is much appreciated it. I have a table with 3 columns(SSN,DeductionType,DeductionAmount). Let say I have 100 employees. There are 3 records per employee, because each have 3 different...
  11. J

    How to Put Two Columns' Values into one List-Box

    Thank you, Paul. I understand what you are saying, but I might have left out some details since I just wanted to get to the point. To clarify, ListBox1 is nothing but to let my select statement decide which database table my query will select from. My form is a dynamic interact form for...
  12. J

    How to Put Two Columns' Values into one List-Box

    Thank you, thank you! This works! I knew how to write the select statement but I was not aware that I have to set the Column Count to 2. No wonder the list-box came out blank when I did not set it to 2. Now I have a different question that is very similar to my previous post, but with a...
  13. J

    How to Put Two Columns' Values into one List-Box

    Hi All, I have a list box and I populate it with records from a "Select" query. I am using VBScript to do this. Here are my codes: gr1_list.RowSource="Select Criteria from CriteriaList WHERE Criteria='" & cvalue & "';" My "CriteriaList" table has two columns; Criteria and...
  14. J

    Me!

    Hello All, I have seen someone that write a script like this: If menulistONE.Visible = True And NullToZero(menulistONE) = 0 Then Me!menulistONE.Visible = False ElseIf menulistTWO.Visible = True And NullToZero(menulistTWO) = 0 Then menulistTWO.Visible = False What does the Me! do in this...
  15. J

    Adding Items to List Boxes

    This is a somewhat complicated question to explain, so please bare with me. I have a form with a ‘list box.’ The box is populated using a Table/Query Row Source Type method. The table I am grabbing the list from is “Department,” where it contains a list of my company’s departments(ie...
  16. J

    Row Source -Table/Query

    Hi All, This is a question that is a bit complicated to describe, so I'll try my best. I have a form with a 'List Box' and i am using 'Table/Query' to fill the box. The table I am using is, "Department;" where it contains a list of all company's departments(Accounting, HR, Payroll, etc.)...
Back
Top Bottom