Search results

  1. M

    Opening a form depending on IF statement

    Hi all. I have a form that i wish only to open if a particular criteria is met. The code i have got so far is as follows: Private Sub OpenTraineeDetailsBtn_Click() MsgBox Me.NumOnCourse MsgBox Me.Location.Column(2) If (Me.NumOnCourse < Me.Location.Column(2)) Then On Error GoTo...
  2. M

    End of record set error messages

    Thank you! Thats solved the problem. Your help is much appreciated.
  3. M

    End of record set error messages

    Hi all I have a problem that i'm not quite sure how to sort. Initially when i started using Access, i had message boxes that would pop up when i was at the end of all records and there were no more in the direction i was going. These message boxes just let me click ok and then dissappeared. The...
  4. M

    Cannot get my head round this

    Hi people I am trying to get a combo box to display a set list depending on the values in a table. I have a form which takes booking details for PC's and on this form is a combo box which shows available time slots. I want this to be restricted by whether time on that day and on a specific...
  5. M

    Combo Box problem

    That worked great Thanks for your help, its much appreciated. Cheers :)
  6. M

    Combo Box problem

    that works when i add a unique field to the combo box. however when the drop down box comes down, i now get the unique autonumber and the surname, but the forename is no longer visible. how do i get it so that just the surname and formname are shown. Also the ComboBox identifier, is that just...
  7. M

    Combo Box problem

    Hi all I apologise if this problem has cropped up on other posts, its just i couldn't find anything on it. I have a combobox on a form which is shows two fields from a lookup table. the other fields are not shown in the combo box. The two fields are the surname and forename of a person. Within...
  8. M

    Form giving error

    I have just tried that prior to you posting the last message. That sorts it, thats what the problem was. Its all working now. :D As you suggested, taking out the quotes around the reference to the column allows it to be read as it should be. Thanks a lot for your help Fizzio, i appreciate it.
  9. M

    Form giving error

    Don't know if this will help but i have played around with the code and tried to open the record in the "test" form using the PatForeName field. This is working. I now believe it is something to do with the PatUnitNo. I'm not sure what would be causing thsi not to work though.
  10. M

    Form giving error

    The allow options are all set to yes. I have zipped the db but it is still 994K and will not allow me to post it. i have cut back on all the unnecessary tables and forms in the db but cannot get it any smaller. Thanks
  11. M

    Form giving error

    Hi again Ok, i've checked both "TitleForm" and "Test", all redundant code has been removed and there is no event code in "test" other that the onClose event. The error "The openForm action was cancelled" still appears. When i choose to debug the error seems to come from the doCmd.OpenForm line...
  12. M

    Form giving error

    It seems that there are lots of code fragments relating to button clicks like this which contain doCmd.close commands: Command1037_Click() I'm going to try and locate them all and see what they all do but i don't think that they relate to anything on the form. Would that make a difference if...
  13. M

    Form giving error

    I never wrote the database in the first place, i'm just trying to adapt a Title form that does what i initially said. From what i can see, there is no more code in the events section of the form "test", apart for a re-query of the "TitleForm" combobox onClose. The combobox on the "TitleForm"...
  14. M

    Form giving error

    Hiya That didn't seem to work. I have this piece of code now in the onClick event of the button on the TitleForm Private Sub SelectPatientBtn_Click() DoCmd.OpenForm "test", , , "[PatUnitNo] = '" & Me.SelectPatient.Column(3) & "'" DoCmd.Maximize End Sub I have removed the...
  15. M

    Form giving error

    Hi all I have a problem with a form i am building. From an initial form (TitleForm) i want the user to be taken to a screen that lets them add a patients details if they don't already exist on the system. When the user adds a new patient the "patient details form" opens on a new record and...
  16. M

    DateDiff not working

    Thanks for your help IMO, that worked
  17. M

    DateDiff not working

    Hi all I'm having a problem with the datediff() function in Access 2K. I have the following code in an unbound text box: =DateDiff("d",Date(),25/7/2003) I had expected the result to be 24 but instead the text box is showing -37803 Can anyone shed some light on what i may be doing wrong. Thanks
  18. M

    Forms and Subforms

    :) Indeed
  19. M

    Forms and Subforms

    Apologies Fizzio I now understand what your getting at. Thanks for your help :)
  20. M

    Forms and Subforms

    I tried doing that by setting the default value of the "Number of trainees on course" field to th query result. The value 0 keeps on appearing in the bound text box. Is there something simple i seem to be missing? It seems to work with an unbound but not a bound text box. Cheers
Back
Top Bottom