Search results

  1. S

    Conditional format - unconditional surrender

    I would stick the following code behind the combo box: If Me.MyCombo = "Yes" Then Me.MyCombo.BackColor = vbRed Me.MyCombo.ForeColor = vbWhite Else Me.MyCombo.BackColor = vbWhite Me.MyCombo.ForeColor = vbBlack End If There might be a better way but I think that should work. shay
  2. S

    Problem pausing execution

    Many thanks for the replies. Opening the form in Dialog mode is the simplest solution I think. I did once know this but months away from Access has resulted in it a memory lapse!! Regards shay :cool:
  3. S

    Problem pausing execution

    Hi I've not used Access for a while and need some help... I'm writing code to import data from an Excel spreadsheet. The data will not necessarily be in the correct units, so the plan is to import the data to a temporary table, display all the determinands which are in the wrong units and give...
  4. S

    DCount + SQL

    Hi You could try the adapting the following code: Dim TableName As String, x TableName = "tblRates" & cmbMonth & cmbYear (cmbMonth and cmbYear refer to your two combo boxes) x = DCount("*", TableName) MsgBox x But personally I would have just one table, tblRates, with...
  5. S

    How do I clear the selection from a listbox?

    Worked a treat. Thanks mate! shay :cool:
  6. S

    How do I clear the selection from a listbox?

    Hi I'm using a listbox with the multiselect property set to 1 (simple multiple selection). How do I reset the listbox ie clear the selection? Can't find anything in the help text. TIA shay :cool:
  7. S

    Take a new page for a new branch

    You need the page break before the Branch Header so force new page BEFORE section. shay :cool:
  8. S

    How do I get each section to start printing on an odd page?

    Thanks for that Rich but the article wasn't quite what I was looking for as it describes how to print separately the odd and even pages of a report. My report has around 10 groups and what I want to do is start printing each one on an odd page. From the KB article, I know how to identify when...
  9. S

    How do I get each section to start printing on an odd page?

    Hi all Report's written and working fine apart from one thing. It starts printing each section on a new page but, because in our efforts to save trees we have double-sided printers, I sometimes get two one-page section reports back-to-back but each one has to go to a different person! I need...
  10. S

    Checkbox to hide labels

    Another solution... Hi I've attached an alternative solution for you to use or ignore as you please! There's any number of ways to code a problem but always try to avoid having to repeat code. If you need the same piece of code in more than one place, write a separate sub or function and call...
  11. S

    Updating Solutions

    I work on (a copy of) their live file. Not saying that's the best approach but it works well enough for our situation. shay
  12. S

    Hidden attribute

    Many thanks. Shay :cool:
  13. S

    Updating Solutions

    Hi My back-end mdbs only contain data tables so very rarely need updating. If this ever occurs, the customer has to suspend use of the system until the change is made and the new file supplied but we're usually talking minutes rather than hours or days. hth shay :cool:
  14. S

    Hidden attribute

    Hi How do you reset the hidden attribute once you've already set it to True and can no longer see the table in the Access window? shay :confused:
  15. S

    Multiple Textbox Keypress

    Hi I'd create a function Public Function CheckInput(KeyAscii As Integer) CheckInput = IIf((KeyAscii = vbKeyDelete Or KeyAscii = vbKeyBack Or (KeyAscii >= 48 And KeyAscii <= 57)), KeyAscii, vbKeyClear) End Function and then put the following line of code KeyAscii = CheckInput(KeyAscii)...
  16. S

    Read-only, protect a form...

    It's a bit late to join this debate but ... I normally use a command button to switch my forms between read-only and editable. Give the following code a try: Private Sub cmdAllowEdits_Click() With Me.cmdAllowEdits If .Caption Like "*Read-only*" Then .Caption = "Click...
  17. S

    Filter by form

    Hi Has anyone managed to sucessfully use their own command button to apply a filter? In my example, as soon as you click the Filter by form button, every other button is disabled and I can't use the Apply filter button! I'd prefer not to use a custom menu or toolbar so any suggestions...
  18. S

    Group by Month

    ... so why not include year([yourdatefield]) and group on both? shay :cool:
  19. S

    Auto Update

    Hi Put txtToday = Date() in your option group's afterupdate event. hth shay :cool:
  20. S

    Still Stuck in a Hole

    Hi Eric I have worked out why the .Requery wasn't working. When you have a form and subform, you need to define the Link Child and Master fields to keep the data in synch - you do not have to keep redefining the recordsource for the suform as you have with qryDynamic_QBF. I got your Search by...
Back
Top Bottom