Search results

  1. A

    Select Statement

    Is there a way to assign a field a value temporarily in a query? My problem seems to be that if you are calculating a percentage of say 15,000 which in this case are total sales. That number is the total of two categories; East and West. The East and West totals are aggregates of months...
  2. A

    Include negative amounts in query

    Using this query: SELECT ApTest.GrossAmt, ApTest.PaidAmt, ApTest.DistAcct, Abs([GrossAmt]) AS Expr1 FROM ApTest WHERE (((ApTest.GrossAmt) In (SELECT [GrossAmt] FROM [ApTest] As Tmp GROUP BY [GrossAmt] HAVING Count(*)>1 ))) ORDER BY ApTest.GrossAmt; I can successfully find all the positive...
  3. A

    Find duplicates

    I've got this query. SELECT ApTest.[GrossAmt], ApTest.[VenNum] FROM ApTest WHERE (((ApTest.[GrossAmt]) In (SELECT [GrossAmt] FROM [ApTest] As Tmp GROUP BY [GrossAmt] HAVING Count(*)>1 ))) ORDER BY ApTest.[GrossAmt]; Which works fine but I I want to include negative amounts as being a...
  4. A

    Query By Form

    I have an unusual problem. I have a form called frmSample. On the form are several combo boxes which the user can select different criteria and then the query collects the entries, selects the records and loads them into the form called frmProject. There are lots of problems getting it to...
  5. A

    Filter Help Needed

    I am trying to filter a report by a date range using the code below. I know the filter string is supposed to be something like: ([StartDate] >= #strfilter#) AND ([EndDate] <= #strfilter#) I just cant get it. I have a text box for the StartDate and one for the EndDate. Can someone show me...
  6. A

    Function asks for parameter

    Can someone tell me why this function is asking for a parameter? Option Compare Database Option Explicit Function MultipleValueCriteria(pform As Form, _ pcontrol As ListBox, pfield As String) 'Launch rptSummaryReport using 'OR...
  7. A

    Add field to table then check for null

    I need to add a Yes/No field to a table. I know I can do this in design view. Next I want to loop through the table and set it to Yes if certain fields are null. What I need help with is the VBA looping part and setting the boolean field to Yes if the fields being checked are null.
  8. A

    Multiple condition query

    Im trying to build a query that checks four fields for blanks. If I try to run the query with the criteria Is Null for all four fields, I only get 27 records. However, if I run the query with the condition only on one field I get the right number of records around 1000. I have been having to...
  9. A

    Warning of field Is Null

    I tried putting in some rules in my form in the validation rule property but am running into a problem. The warning displays as it should but after you enter something in the control, the warning still appears. Or if you change the entry the warning comes back and again it says it is null or at...
  10. A

    Can someone explain this code to me?

    I was hoping that someone could explain what this code is doing? It looks like it is filtering but my question is if any of the If statements are true, does it filter it so it will not be visible in a form? The form is supposed to show all active records but I think that some are failing some...
  11. A

    Auto populate current date

    I need to auto populate a control with the current date and then lock it so it wont change every time the form is opened. Couldn't seem to find anything on that topic. Thanks
  12. A

    Cant follow this code

    I have a form and a two subforms within it. The subforms are the problem. I'm having a problem finding out why the field in the Reports table gets set to zero when a new Status report is added. The sub forms in question are called frmStatusReport and frmProject_sbfrmProjectStatus. The main...
  13. A

    Append Query help

    I have a form that has a DELETE button on it. When it is pressed, the record is deleted which works fine. Now I would like to APPEND the record to a table "Archived Records" before it is deleted. In addition, I would like to include when the record was deleted with a time stamp. The table...
  14. A

    Form Validation Help

    I have a form I need to validate with the code below. While this may work it would be a lot easier on the user to be presented with a list of incomplete fields at time of either Cancel or Save rather than potentially having to answer multiple warning boxes in succession (I know that would...
  15. A

    Populate table

    Hi I am new here. This is probably an easy question but I have not been using access long and would appreciate some help. What I want to do is query two tables. The first table has fields INST_NBR and PRICE_LIST that I need to find a match on in another table with the exact same field names...
Back
Top Bottom