Search results

  1. A

    import

    Are the 100 file names fixed and what about location of such? If these are fixed then just create a table to store the location string, e.g. C:\Down\file001.txt. Just enter a record for each of the 100 files. Then you need to write some code to loop through the table and import each of these...
  2. A

    Group by First letter!

    Set the 'Sorting and Grouping' as follows for the Name field Group Header No Group Footer Yes Group On Prefix Characters Group Interval 1 Keep Together Whole Group Select the Group Footer and go to it's Properties. Set the 'Force New Page' to After Section. Now you...
  3. A

    MsgBoxes

    The option I'd offer is to call the macro from VBA and do your message box in VBA as follows If MsgBox("Do you want to run the macro?",vbYesNo + vbQuestion,"Run Macro?") = vbYes then docmd.runmacro "YourMacroName" else 'whatever you want to do end if
  4. A

    #error in report-easy to answer

    Set the folowing as the Control Source for your field with the #error on the report and it will put in blanks instead of #error. =IIf(IsError([YourFieldName]),null,[YourFieldName])
  5. A

    Query - Show rows...

    Assuming the following rules 1) If number of customers for each user is equal to UTTR1 then show all customers 2) If not equal then show Top n, (n = UTTR1), for each user grouped by UTTR2 the following function should do the job Function DoTopVal() Dim db As DAO.Database Dim qdfResult As...
  6. A

    date Format

    Check the help file under Input Masks
  7. A

    I Think I Am Cursed....

    The problem is in relation to the AfterUpdate of the third combo. You have it set up as if the entry from the combo would be numberic. It should read as follows, the bold highlights what is needed extra. Private Sub cboNumericField_AfterUpdate() Dim strSQLSF As String strSQLSF =...
  8. A

    Complex Date Validation using IIf and Between

    Try Iif(month([YourDateField]) in (1,2,3),"First Quarter","Not First Quarter") In other words if the month is 1 - January, 2 - February or 3 - March.
  9. A

    Count Problem

    Do it as two queries as follows Query1 SELECT DISTINCTROW pend_list.CLAIM_NO FROM pend_list GROUP BY pend_list.claim_no; Query2 SELECT Count(Query1.CLAIM_NO) AS ClaimCount FROM Query1;
  10. A

    Count Problem

    Simplest way would be to do a group query first and then count the CLAIM_NO's in this query to get your count of number of claims.
  11. A

    #error in report-easy to answer

    Why not have the expression in the query setting the value to null? iif([DivideBy]=0 or isnull([DivideBy]),0,[Number]/[DivideBy]) This will then give zero result on your report instead of the #error.
  12. A

    Can you cause the MsgBox comand yes/no to effect a result ?

    The following function will basically do as you require, it will work for any report. The only problem you are going to have is calling this at a time that allows the user to preview the report and check it's correct before printing. Public Function DoPrintRep() If MsgBox("Do you want to...
  13. A

    Syntax

    In the case your showing it should work without the quotes and ampersands at all. Try !Employee = Me.Author.defaultvalue else try setting a string prior to this equal to the default value and then set !Employee equal to this string.
  14. A

    Data range Question - Very easy

    Actually yeah now that I look back at it that syntax would be wrong. You could do If Efficiency < 0.5 and Efficiency >0.25 then or use Select Case Efficiency Case 0.25 to 0.5 what to do? case else what to do? end case
  15. A

    Syntax

    Try rst!Employee = '" & Me!Author.DefaultValue & "'" i.e. single quote, double quote & and & double quote, single quote, double quote I'm assuming your using this in an SQL statement in VBA with further text prior to the rst!Employee
  16. A

    Data range Question - Very easy

    Try If Efficiency Between 0.25 and 0.5 then what to do End if
  17. A

    Query is giving me too much info?

    Can you post the SQL from the query you are having the problem with?
  18. A

    Query is giving me too much info?

    Have you tried using the 'DISTINCT' predicate? Check help under distinct for further details. Example: SELECT DISTINCT Table6.User FROM Table6; would select only one record for each user even if there are multiple occurences of the user in the table. Other than that it's hard to define the...
  19. A

    Query - Show rows...

    Going on what you have detailed it appears that essentially you are attempting to get the first n records for each user grouped by UTTR2 descending. The n is determined for each user from what is in UTTR1. Thus the following function should do this for you. Firstly you will have to create a...
  20. A

    Desperate to know how to write this quiry string

    It looks like they've changed the syntax of In from A97 to A2000.
Back
Top Bottom