Search results

  1. R

    Searching all fields in a table

    Yes you can Hi Adrian I guess you are opening the table from the database window and selecting Replace from the Edit menu (or pressing Ctrl+H). If you are, when the Find and Replace dialogue box comes up, look for an option called "Look In:" - Change this to "<Tablename> : Table". Make sure...
  2. R

    Select form record set by more than one query

    Your filter statement Hi Keith If I understand you correctly - You want to display the projects that are Not started, On hold or In progress, BUT ONLY if they are not pre-initiation or being delivered. My only problem with the list that you gave is ... you included "PIN/SOR Review" then...
  3. R

    Change Colour of Navigation Buttons and Command buttons?

    Command Buttons... Can be formatted, but be warned, you can be walking into a whole world of pain! If you want to try this, instead of using the standard button from the toolbox, select the "More controls" from the toolbox (hammer & wrench icon) and select "Microsoft Forms x.x Command Button"...
  4. R

    Select form record set by more than one query

    Don't confuse queries and filters Hi Keith Please do not confuse queries and filters... Queries produce a subset of records that forms ( & reports etc.) use as a recordset. Filters "hide" (or "display") records within the available recordset. To get your code to work as you want it, you need...
  5. R

    Select form record set by more than one query

    Very Simple... in theory... The following code will set or clear the filter of the form, depending on whether the toggle is pressed or not. You need to paste this into the On Click event for the toggle. I have called this btnToggle1 in this example. HTH Regards Rod Private Sub...
  6. R

    Insert Date at beginning of text field

    Jason - As you seem to be under some pressure - some ideas. I assume that the field is on a form, linked to a table and therefore the "edit" of the field has to be done via VB as part of the button "click" script. To stop the over-writing problem, use the "&" to append the date to the text in...
  7. R

    Printing a single records report from a continuous form

    Hi Sam One thing that I did notice in your code is that there are no [...] around the field names in the criteria. My forms work with Me!, but if you have problems, put the the full references, as per Neil's suggestion and see how you go... Regards Rod Examples: stLinkCriteria =...
  8. R

    typing in combo box

    Hi James In the properties of the combo-box, set "Limit to List" to Yes. The user will still be able to type garbage into the combo-box, but Access will display an error message if what the user types is not one of the options in the drop down list. Regards Rod
  9. R

    combo box in form that displays last 7 days

    Hi Kevin Pleased to hear that the code is working. In answer to your questions, The sort order has changed because of the way the list is being built. In the first example I submitted, the last parameter was a sort "index". In this code, each pass of the loop adds the date at the front of...
  10. R

    User Defined Function not recalculating

    Hi David The problem Your function is not recalculating because it is not "dependant" on the cells being changed. i.e. Your function is looking for a change in the Month Number column as a trigger to re-calc - which is not happening. It does not have the "intelligence" to see that it needs to...
  11. R

    Filter records Not Like "*Corp*"

    Lose the quotes if you want to filter! Hi Sup The problem that you have when filtering is the quotes - strange as it may seem, the filter criteria should be... <>* Corp* I added a space after the first * so that the filter only looks at the beginning of the words, you can change this if you...
  12. R

    combo box in form that displays last 7 days

    Oh the joys of Access and Word... I pasted the code from Word, which "intelligently" changes the quotes, although you have tried changing them, I would change them all to normal double quotes - there is a line above where the strDateList is reset as well. Although Access does not mandate it, it...
  13. R

    combo box in form that displays last 7 days

    Access '97 version I don't have A97 to test on, but this should work. Just replace the function with the one below. Everything else remains the same. Please let me know how you get on. Rgds Rod Function GetLastXDays(ctrlComboBox As ComboBox, intDelay As Integer) 'For Access 97 ‘This...
  14. R

    Search Form Problem

    Glad to hear it worked for you. In the properties of your sub-form, set the Default View to "Datasheet" and away you go... Rgds Rod
  15. R

    Search Form Problem

    So close... You were nearly there with your first attempt... If you change it to DoCmd.OpenForm "QRYSUMCOUNTRY", , , "[Country] = " & "'" & Me.List4 & "'" it should work - Access expects quoted strings for these arguments. Hope this helps. Rgds Rod
  16. R

    Automating Format Painter using VBA

    Took me a while to replicate your problem - looks like it is linked to having differing paragraph formats. Just have to figure out how to switch that bit off now!
  17. R

    Automating Format Painter using VBA

    Do You really want to use VBA? You don't really need VBA to do this. To update the text in the document, Click on Format (from main menu bar), then AutoFormat... A dialog opens that allows you to update the entire document. Click on the Options Button to open the formatting dalog box and...
  18. R

    Automatic rounding up of numbers

    I know this may seem like a stupid question, but have you defined the field type in the table as "Long Integer"? - This is the Access default. As Integers (by definition) cannot hold decimal places, rounding up will always happen. If you find that the field is defined as "Long Integer" in the...
  19. R

    combo box in form that displays last 7 days

    Sample Database updated Hi Kevin I have modified your file and attached it below. What you needed to do was... 1) link the table to the form Form properties - Record Source - set to TABLE-SHIFT_DATE 2) link the combo-box to the table field Combo-box properties - Control...
  20. R

    combo box in form that displays last 7 days

    A slightly different approach... Hi Kevin I read your post to mean that you wanted the selection to be the last 7 days, whether you had corresponding data in your tables or not. My approach was to create the dropdown options based on a function that takes the ComboBox name and the delay you...
Back
Top Bottom