Search results

  1. andrewf10

    Pass 2 fields into some common code

    Hi, I have a piece of code which is something like that below. I have 12 command buttons (Button1, Button2 etc) which will use this same code, with 2 exceptions. The 'FollowOnCreated1' and 'Outstanding Tasks1' fieldnames will vary depending on the command button that's pressed. In other words...
  2. andrewf10

    Loop thru fields and then spell check?

    I have 15 fields beginning with the word Comment. (i.e. comment, comment1, comment2 etc) What Im trying to do is create a spellcheck command button that will only check these fields and only on the current record. I've managed to find this piece of code to do the actual check: With...
  3. andrewf10

    Query to act like a pivot table???

    Ive got a query (SearchCriteria) whose data looks like this: Call ID....Problem Source............Problem Source2 15366.... Complaint.................... 15224....Collateral Order............Complaint 15734....Delivery....................... 15733....Delivery......................Order Taken...
  4. andrewf10

    Convert results to percentage

    I have a query which is based on another (SearchCriteria2)...the SQL is as below: SELECT SearchCriteria2.[Problem Source], Sum(SearchCriteria2.[CountOfProblem Source]) AS [SumOfCountOfProblem Source] FROM SearchCriteria2 GROUP BY SearchCriteria2.[Problem Source]; This gives an output like...
  5. andrewf10

    IIF statement is acting up in a query

    I have a query which is based on 2 tables (Log2000 & Customers) and criteria is entered by the user via a form called 'SearchMarkets'. In concept, if the user chooses a 'Market' on this form, the query uses that value, otherwise it runs everything. My SQL looks like this: SELECT Log2000.[Call...
  6. andrewf10

    Rounding dates up to Monday?

    Hi all, I have a 'StartDate' field which must always fall on a Monday and is based on a previous date + interval. If this StartDate falls on a day of the week other than Monday, I need to add the appropriate number of days to bring it to the following Monday. This can be done using 6 Update...
  7. andrewf10

    Need current and next instance of a job

    Hi, I have around 50 jobs on a table. These have a 'start date' of various dates in a year. A field called 'complete' indicates whether a job has been closed off or not and a field called 'frequency' determines how often the jobs recurr (in days). I need a query (which I'll run every night)...
  8. andrewf10

    Generate table of weekend dates through VBA?

    Hi, can someone please give me some inspiration on this? I need a piece of VBA that will generate a table of all weekend dates for a particular calendar year. Thanks
  9. andrewf10

    Update query based on lookup tables values

    Hi, not sure if this is possible or the most economical approach but here goes: I have a lookup table (tblHolidays) with a list of holiday dates (fieldname "HolidayDate") in it. I need an update query that can check all "StartDate" values on a table called "tblMasterLog" and where this date...
  10. andrewf10

    Up to 3 combo boxes as query criteria???

    I have a combo box called 'Status' of which there are 6 values to choose from. What I'm trying to do is have a report that will display results based on a query that takes the combo boxes value in as criteria. This is no problem for a single combo box. However, I want to be able to select up to...
  11. andrewf10

    Open form, filtered, then copy records

    Im trying to create some code which will open a form, filtered to specific query criteria and then copy each resulting record to a new record while a field called 'Complete' has a value of True. Can someone please suggest some ways of doing this? I have a query which selects the records...
  12. andrewf10

    Type Mismatch error

    I'm trying to write a SQL statement on a form called frmForm1 but when I run it, I get a Type Mismatch error message. All the relevant fields are set to text on their tables so I'm out of ideas. Can someone please help? Many thanks DoCmd.RunSQL "SELECT tblCollateralPurchasingGroups.[Purchasing...
  13. andrewf10

    Find record problem

    I have a 'cmdFind' command button which can be used to search any field, depending on which textbox the user has the focus on. But if another object such as a command button has the focus instead and the user doesnt notice this, a message appears: The control 'cmdFIND' the macro is attempting...
  14. andrewf10

    Record Selector equivalent in code?

    Hi, I know I'll probably have to wait until Access 2015 is released but has anyone ever come across a way of hiding record selectors on a form and handling it through code instead? I'd like to test if a record is locked when it's made current and if so, produce a message box. I thought it...
  15. andrewf10

    Run time error 13

    Hi folks, I have 2 forms on a table. Record locking is set to 'edited record'. User 2 goes onto Form 2 and edits record. User 1 goes onto Form 1 and presses 'save' for whatever reason. The save button attempts to set a field (say field1) to some value but gives a run time error 13 'type...
  16. andrewf10

    Openform problem

    Hi folks, I've been playing around VB for days now and I've gotten nowhere on this issue. Hopefully someone can help me: On hitting a save button on Form 1, I need a Form 2 to open + check if the current ID number exists on it. If not then create a new record (only the ID number) in this...
  17. andrewf10

    Visible, maximize, hide, minimize, restore, enable?!

    Hi all, I hope some of you can give me some inspiration here. I have an Autoexec macro that opens Form1 and Form 2 at the same time. Both forms maximise and Form2 is the one that shows on screen, with Form1 behind it. Both forms are modal. What I need is a command button on Form2 that will...
  18. andrewf10

    Kick users off immediately

    Hows it going all? Just a quick question for you experts out there. While the excellent sample database at RogersAccessLibrary will allow me to kick a user off my database in X amount of minutes/hours, has anyone ever needed to kick a user off immediately, and therefore render the OnTimer...
  19. andrewf10

    Form colours - what do you use?

    Hi all, In an attempt to get rid of the boring grey background that seems standard with Access forms, I've been running my first ever database for 12 months with an orange(!) background and blue text. However, it does look a bit over the top and unprofessional so I'm wondering what you fellow...
  20. andrewf10

    Greying out the 'Name' on the logon box

    Hi all, Has anyone ever found a way (or a reason) to lock the 'Name' part of the Access 2000 logon box using a command line or batch file? I want to prevent users from logging onto the database from different machines. Thanks for reading this
Back
Top Bottom