Search results

  1. C

    VBA/SQL Logic problem editing a record in a form

    To Begin with Change Record 3 to Start at 11AM and end at 3pm Change record 4 to Start at 3pm and end at 4pm If you now edit record 4 to Start at 9am it will show valid If your change record 4 to to Start at 1pm it will show Invalid. This is assuming of course that we are using Start > End...
  2. C

    VBA/SQL Logic problem editing a record in a form

    That is correct. I have been playing with your form and have nearly got it to work by taking out the MyID check and putting the check to BookTime > dteEndTime And BookEndTime < dteStartTime. It works if I change start time great than any record Start time but if there is no record with a start...
  3. C

    VBA/SQL Logic problem editing a record in a form

    Hi vbaINet, Thanks for this, I can see what you have done but you have made the query to be invalid only when BookTime = dteStartTime and BookEndTime =dteEndTime. This does work if I try to edit for the same times but what I am trying to validate is:- If the Booking Starts Between another...
  4. C

    VBA/SQL Logic problem editing a record in a form

    Ok I think I have managed to save in mdb format hope you can open this one.
  5. C

    VBA/SQL Logic problem editing a record in a form

    Heres another frustration, although the Save & Publish function Gives the alternatives IE 2000 2003 etc, it will not let you save in anything other than the deefault? Obviously, 2010 is not backwards compatable which is great isnt it?
  6. C

    VBA/SQL Logic problem editing a record in a form

    The database is already in Access 2007 File Format, the only other options I have are 2000 or 2002/2003. I do not have any option for 2007 and when I look at the Option pane it tells me that the Default is set to 2007? Happy to save as any of the others if yoy wish
  7. C

    VBA/SQL Logic problem editing a record in a form

    Ok I have attached the current Db which is small. I had to change the Date format back to dd/mm/yyyy because it complianed of a data mismatch agian when I changed it back to mm/dd/yyyy? You will notice that I have changed the time format to Hh:Nn:Ss AM/PM also as I found this Syntax on the web...
  8. C

    VBA/SQL Logic problem editing a record in a form

    I now think we are getting somewhere as I think it is to do with the Time Formating. My Time variables in the table show 11:00AM and 16:00PM but we have declared format as H:m:s. What do I change the format to in order to reflect 11:00AM because I dont know the syntax for this?
  9. C

    VBA/SQL Logic problem editing a record in a form

    Found the Data error we had declared date as mm/dd/yyyy and it my date is dd/mm/yy/ Anyway, I changed this and the script runs but it still validates an invalid change. I have 2 booking for 8/11/2011 in Room 1 1. First is from 11AM - 4PM 2. Second is from 4Pm - 7PM When I change record 2...
  10. C

    VBA/SQL Logic problem editing a record in a form

    I actually cut a pasted the wrong code to you as I had a copy and was trying things out because on the debug screen the time shown for the variables was 09:0:0 and 10:30:0 whereas the Me.variable times show 09:00:00 and 10:30:00. I was simply wondering if this was the problem and took them out...
  11. C

    VBA/SQL Logic problem editing a record in a form

    Can I say that I am appreciative of your help and am trying your recomendations. I used both the DoCmd.SaveRecord and the Me.Dirty that you gave me and niether of them made any difference. As to the code I am using what you gave me and any change made was simply to reflect a declaration change...
  12. C

    VBA/SQL Logic problem editing a record in a form

    This is beyond logic and driving me nuts. I tried both the save and the Me.Dirty placing then just before the Dcount function. The results are just the same IE Record Valid!!!!!!!!
  13. C

    VBA/SQL Logic problem editing a record in a form

    That is what I thought, but when I captured the variables using MsgBox to show the table field and the form field they were showing as Identical. I am therefore assuming that Access automatically saves a record when it loses focus. this is why we are trying to exclude the edit record from the...
  14. C

    VBA/SQL Logic problem editing a record in a form

    Hi vbaInet Have sorted the Error (I had a typo). I have attached the part of the form and table so That you can see what I mean (hope this helps) Try Changing one of the records to see what happens and you will see the sql does not appear to trap the confilct.
  15. C

    VBA/SQL Logic problem editing a record in a form

    Am now getting Error 3075 Syntax error (missing operator) with the SQL all of the Form Variables return correct values
  16. C

    VBA/SQL Logic problem editing a record in a form

    Have substituted your line and results are still the same....Validates every change regardless of conflict. Both Time variables are set as Date/Time medium time and Date variable is short Date
  17. C

    VBA/SQL Logic problem editing a record in a form

    Hi vbaInet, I take your point about the replace and have tried your version and mine but get the same result. IE it validates everything. The GoTo by the way is because this procedure is only part of the Edit process and if the SQL validates a booking it will go to the next part. For the...
  18. C

    VBA/SQL Logic problem editing a record in a form

    I have a logic problem that is driving me insane and wonder if someone can help. I have a bound form listing a number of room booking records and I wish to select one of them and change the booking. However, before I save the edit I need to check that the edit will not conflict with any other...
  19. C

    Deleting an Outlook Appointment from Access VBA

    Hi Nigel, Am working with your suggestion for a later version as I managed to get my code working ok AT LAST! I was really struggling with the declaration aspect and found that there were no examples avialable anywhere. I fully appreciate your help on this and for the code, looking at yours...
  20. C

    Deleting an Outlook Appointment from Access VBA

    Nigel Have just worked out how to send you my code better, Please ignore the attachment on my last. here is my code ' The Following variable assignments will pick-up the old booking data prior to the change in order ' to find and delete an Outlook booking. Variables have been caputured by...
Back
Top Bottom