Search results

  1. F

    using a function in a query for if/then/else

    I have a field I want to calculate using IIF. There are about 40 possible values, thus I have about 40 nested IIFs. Because I get "query is too complex" when I try to nest all 40 IIFs, I've had to break this down into 3 fields. I then have to do a little more manipulation to end up with the 1...
  2. F

    putting result of prompt in MsgBox

    I have a command button that imports a text file. Since this file doesn't have a month field, I also run an update query which puts the month (based on what the user enters when prompted, which comes from the qUpdateMonth query) in that field. Breifly, I do this with the following code...
  3. F

    running a routine from another form

    I have 3 forms that run different reports. All 3 forms have a command button that runs several (make table and append) queries - the same several queries. I've been testing the command button that updates the tables (along with a progress meter) on one of the forms. That works fine on the one...
  4. F

    function for a report; KB article 129096

    I'm using Access 97 and I'm trying to use code from MS KB 129096. The first function in method 3 of the article has the following: Function CalcProduct(R As Report) Dim tmpAmount As Double tmpAmount = R![UnitPrice] * R![Quantity] OrderTotal = OrderTotal + tmpAmount GrandTotal = GrandTotal...
  5. F

    minimize a form

    On my mainform, I have command buttons that open other forms. Is there a way for the mainform to be minimized when one of the other buttons is selected (and opens the new form)?
  6. F

    description for table from make-table query

    Is there a way to create a description in the database window for a table that gets created when running a make-table query? I have several make-table queries that will get run often, in order to get up-to-date information for a report. Now, when the make-table query is run, the description in...
  7. F

    query values give #Error on report

    I have a big query with many fields that several reports are based on. A bunch of reports work fine. I have a new report where some of the fields in the query wind up giving me #Error instead of the value that is in the query. By testing I discovered some fields don't like when I use...
  8. F

    more that 1 record

    I have a query that has, among other fields, name, sprg (short for subprogram), date, and a calculated field called InsJan. There will be 1 record for each name/sprg combination. If there’s only 1 sprg for a person, I don’t have a problem with InsJan. But if there’s more than 1 sprg for an...
  9. F

    can't figure out grand total

    I have a report based on a query (which is based on other queries and tables). The output of the query has a record for each employee and subprogram (sprg). Each sprg has more than 1 employee. All but 3 of the many fields come out okay on the report. The report has detail information for...
  10. F

    sql view (font, format and comments)

    Is there a way to change the font of the code in the SQL View in a query? It's not very easy to read. To make the code easier to use, I use a lot of carriage returns and have fields line up where possible. However, when I close the query, those carriage returns dissappear and all the code...
  11. F

    criteria in query

    I have the following code in a query: HAVING ((([enter 1 or 2 digit fiscal month])=[enter 1 or 2 digit fiscal month]) AND ((tAllYears.DisbMonth)<=[enter 1 or 2 digit fiscal month] Or (tAllYears.DisbMonth)="prior")) OR (((tAllYears.RecMonth)<=[enter 1 or 2 digit fiscal month] Or...
  12. F

    parameter query in a report

    I have a paremeter query which gives me correct information - one or more records, per month, per contract #. When I run the query and enter "1" for the month field parameter (not shown below, but meaning I want all records which have a DisbMonth of 1, or a RecMonth of 1) I'll get the following...
  13. F

    query too complex - need help creating function

    I'm kinda new at this and I've been trying a lot, but I can't seem to figure this out. I have a query which says it's too complex when I run it. I've tried many ways to divide it into smaller queries, but I still can't get the whole thing running. I saw a post where someone else had a similar...
Back
Top Bottom