Search results

  1. MattS

    Forms

    You could try the following code behind the command button: IF checkbox1 = True Then Sales Report by Name IF checkbox2 = True Then Account Master List IF checkbox3 = True Then Export Data to Excel HTH, Matt.
  2. MattS

    Make Access The Active Window

    Thanks for all your help Antomack. I still can't get it to work correctly - I got the following results, with Outlook and Internet Explorer also open: TestDB minimised, Outlook as foreground window - OK TestDB minimised, IE as foreground window - OK TestDB maximised, Outlook as foreground...
  3. MattS

    Use criteria from Report for Subreport

    You could remove the criteria from the query that feeds the subreport. Then in the design view of the report, use policy number to link the child/master fields on the subreport. Or, use a control on a form as the source of the policy number, and refer both queries to the control. HTH. Matt.
  4. MattS

    Make Access The Active Window

    Thanks for the code, but from what I can make of it, it's all about which window within Access it shows. I've attached a (very) simple example of what I'm trying to do. Open the db and after 15 seconds another form opens telling you to get out. This closes after 5 seconds, and the db then...
  5. MattS

    does this exist?

    Check out rogersaccesslibrary I think theres a Find and Replace add-in tool there. Never used it, but heard good things about it.
  6. MattS

    Reference table field in Event Procedure

    Would DLookUp suffice? If there's only ever one record, simply leave the criteria out: DLookUp("FieldName","TableName") HTH, Matt.
  7. MattS

    If, then, dlookup

    dcx693 - I thought IsNull([TheField]) was a VBA expression, and have always used [TheField] Is Null is any queries or Form/Report controls.:confused: Not 100% sure, but it's always worked for me.:) Matt.
  8. MattS

    Make Access The Active Window

    Thanks for the help so far. Using various of the above suggestions, I currently have the following code included within my on_timer event: Dim lngHwnd As LongstrAppTitle As String strAppTitle = CurrentDb.Properties("AppTitle") ' Get Database name AppActivate strAppTitle ' Make...
  9. MattS

    Unhide/enable controls when certain value is chosen from listbox on form

    Point taken. Although if he only has a couple of controls, looping through the lot does seem a tad excessive....;) ;)
  10. MattS

    Unhide/enable controls when certain value is chosen from listbox on form

    Or on the on_click event of the list box have an IF statement: IF YourListBox.Value = WhateverValue then YourControl.Visible = True YourControl.Enabled = True Else YourControl.Visible = False YourControl.Enabled = False END IF
  11. MattS

    Make Access The Active Window

    Thanks for the replys guys. Wayne - wasn't really what I needed this time, but some nice tricks in there I may make use of at a later date. Ghudson - have tried the AppActivate statement, and it kind of half works. I call it just before I open the warning form, but it doesn't actually make...
  12. MattS

    automated field based on value of multiple fields

    It's not very neat, but I think the following would work: =IIf([Performance]>[Schedule],IIf([Performance]>[Cost],[Performance],[Cost]),IIf([Schedule]>[Cost],[Schedule],[Cost])) HTH, Matt.
  13. MattS

    Make Access The Active Window

    Is this possible? I'm using the code from rogers access library that allows you to automatically kick users out of a DB. It works on the on_timer event, and in my case opens a form telling them to get out (which closes after 30 seconds), and then exits them after 3 minutes. This works fine...
  14. MattS

    Access acting weird

    I'm assuming that in TblParts, PartNumber is the Primary Key? Just a hunch, but if everything works perfectly with the test data you have in there, but doesn't when you replace it, is it because you've lost the relationship between the tables (i.e. PartNumber in TblPartsTracking no longer...
  15. MattS

    Access acting weird

    If I understand correctly, you say that when you delete the contents of TblPartsTracking before running this code, nothing happens? Well, your SQL contains an INNER JOIN between TblParts and TblPartsTracking, so if you delete the contents of TblPartsTracking, your SQL will automatically return...
  16. MattS

    search multiple fields

    So long as the Parameter your searching for in each field is called the same thing, Access will only ask you for it once, i.e. [Enter Seacrh Criteria] In the query window enter the above on one line for field 1, then on the next line for field 2, the next line for field 3, etc.. The SQL should...
  17. MattS

    I Wanna Learn VBA!!!

    Check out this thread: www.access-programmers.co.uk/forums/showthread.php?s=&threadid=51192 I highly recommend Access 97 - Power Programming, by F. Scott Barker. I don't know if there's a A2k equivalent. I'm running A2k, but find this book invaluable. HTH.
  18. MattS

    Filtering dates on a list box

    Why not reference the StartDate and FinishDate fields in the criteria that feeds the list box? Then either in the after_update property of the FinishDate field, or on a command button, simply have List0.Requery
  19. MattS

    Printing Reports

    If you've set up a group header for Cost Centre, right click on it and look at the properties. You'll find page break options - try selecting 'Before Each Section'. HTH. Matt.
  20. MattS

    Defining table records within VB

    Just a suggestion, but if you're checking for a null value you may have problems with the above (you can't assign a Null value to a String). Add NZ() and you should be fine : strStreetName = NZ(DLookUp("StreetName", "tblCustomer", "CustomerID =" & Me.CustomerID),"") HTH. Matt.
Back
Top Bottom