Search results

  1. Robert Dunstan

    Make report with records from 2 tables

    You need to create a query that pulls the records from the 2 tables and base your report on the query. How are the 2 tables related to one another? Can you explain a bit further Rob
  2. Robert Dunstan

    Message Box when no data

    Hi Kristin, You could place some code in the On_Load event of your main form that tests your key field for a null entry e.g: Private Sub Form_Load() If IsNull(your KeyFieldNameHere) = True Then MsgBox "There is no data", vbExclamation DoCmd.Close End If
  3. Robert Dunstan

    Split Database

    You need to use the 'Linked Table Manager' In A2K it's in Tools---->Database Utilities. Click 'Select All' and tick 'Always prompt for new location'. The wizard will then ask for the new location of each table and refresh the links. I also noticed that the link is mapped to a network drive...
  4. Robert Dunstan

    opening a form on different levels

    Hi Assuming you have one manager you could check the username and then enable / disable the buttons appropriately Select Case txtUserName Case "Joe Bloggs" cmdMyButton.Enabled = True Case Else cmdMyButton.Enabled = False End Select Place this in your form's On_Open event Alternatively you...
  5. Robert Dunstan

    cboBox

    Ok Try the follwing in the AfterUpdate event of your combo box: DoCmd.RunCommand acCmdSaveRecord Then in the GotFocus event on your next field: cboYourComboBoxNameHere.Requery One thing to bear in mind though, if you have fields on your form that are required entries then the DoCmd...
  6. Robert Dunstan

    opening a form on different levels

    Firstly how have you implemented the security? Did you use Access User-level security or did you devise your own and store permission levels etc. in public variables
  7. Robert Dunstan

    cboBox

    Don't quite understand your 1st question. Are you saying that you can't requery the combo box until the record is saved yet you want to requery it whilst data for the record is being entered? :confused: In answer to your second question you can capture the previous value of a control by using...
  8. Robert Dunstan

    Access doesn't shut down

    Just a thought... Are you using code to close your apps?
  9. Robert Dunstan

    Store Label Name in a Table

    You need to create a text box that is bound to your label name field in the label table. Then in the On_Click event of your label use this code: txtYourTextBox = lblYourLabelName.Caption DoCmd.RunCommand acCmdSaveRecord
  10. Robert Dunstan

    Making fields visible

    Hi there, The reason why you are getting this error is that Access is looking for variables called: frmtblLiteratureSubform ReceivedWritingPermission ReceivedTelPermission If they are not declared i.e. Dim myVar as String etc. then Access throws a compile error 'Variable Not Defined'. The...
  11. Robert Dunstan

    Stuck on Null!

    I usually use an If Then statement for required entries If IsNull(Me.cboMyCombo) Then MsgBox "Please select from the list",vbCritical, "Missing Entry" End if
  12. Robert Dunstan

    Can Anyone Answer this Simple Query Question?

    CassandraB Here's an example of what I played around with (it's in 2000) Am I anywhere near the mark of what you wanted?
  13. Robert Dunstan

    Can Anyone Answer this Simple Query Question?

    Ok you need to create 2 queries. In query 1 set the criteria to 'Fail' (to select all records with Fail in it) and in the 'Yes' field set it to Is Null (to ignore records with Yes in it) The result should be to only select the records that have Fail and not 'Yes' In query 2 do the exact...
  14. Robert Dunstan

    IF Functions

    The 2 common ones are ones that I mentioned E.g If...Then...Else If cboProduct.Value = "Bow" Then ' Code in here to do what you want If cboProduct.Value = "Pillow Sham" Then ' Do something else End If End If E.g. Select Case Select Case cboProduct.Value Case "Bow" ' Code to do what you...
  15. Robert Dunstan

    Record Selection

    Firstly have you tried creating a new combo box using the wizard? Just follow the steps and it will create the code for you. Post again if doesn't work
  16. Robert Dunstan

    IF Functions

    If you could explain a little bit more on what your trying to do, there may be other options you can look at e.g. If...Then...Else statements Select Case If your using nested IIF functions then it becomes a little cumbersome and confusing to make sure you covered everything. I tend not to use...
  17. Robert Dunstan

    Just a quicky...

    Ok I think I underdstand what your trying to do so here's my suggestion: Make your text boxes for the number of days unbound controls then in the AfterUpdate event of [Stop Date] combo box try the code below If IsNull([Start Date]) = False Then Text1.Value =...
  18. Robert Dunstan

    Is it possible to create my own menu bar ?

    Yes you can. There is wealth of information in the Access help relating to customising / creating your own toolbars and menu bars. Also search this forum as there are a number of posts relating to this subject as well. Rob
  19. Robert Dunstan

    Possible Bug???

    When you get the error message do you get the option to 'Debug'? If so this will highlight the offending code (if any) Looking through your code I can't see any reference to a form called 'ViewByLocation'. Have you compiled your code as well?
  20. Robert Dunstan

    Subform Totals

    Create an unbound text box and it's control source you reference your subform's total =([frmYourSubFormName].[Form]![txtYourControlName])
Back
Top Bottom