Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2012
    Posts
    70

    Unanswered: Delaying one field being entered to prevent an error

    I am creating a form which will allow a user to enter a date and a customer name into a form and have the full details of their booking for that day appear below.


    However, unless both fields are true (i.e. they both respond to an existing booking) I will get a ringing noise play and nothing will get changed in the form (i.e. I get an error - no message).


    How can I delay the input of the first field (date) so that I have enough time to enter the correct second field (name) for there to be no errors.


    If there is a booking I want this to appear below. (also, is it possible for the fields below to appear blank if there is no such booking - if no delay can be put in then this would be a solution also!)




    To explain a little more:
    The use of this form would be so that (as a scenario) a customer on the phone has a query about a booking she has had or is going to have. She will tell the database user and that user can enter the name and date and have the details appear.

    The DB is also attached to clear things up, it is the CustomerBookingsSearch form.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    check why you have the error
    my guess is you have probably stuffed some VBA code behind a contorls on after update event.

    if you dont' knwo what the error is then I'd suggest you place a watch/breakpoint on the forms on loiad event and step throught the code till you find what line /a crtivity triggers the error.
    but as said before it sounds like its a some validation code that isn't set in the right place
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2012
    Posts
    70
    I'm sorry, you said a lot of stuff that I don't understand then. I am a beginner with databases.


    I haven't done any VBA code, I only use access' GUI.
    Last edited by kkid; 10-28-12 at 09:53.

  4. #4
    Join Date
    Aug 2012
    Posts
    70
    I've just noticed some errors appearing at the bottom of the page when i try to change one of the two inputs.

    If I try to change the date, I get "This recordsheet is not updatable"
    If I try to change the name, I get "This control can't be edited; it is bound to autonumber field "Client_ID""


    Am I going about making a search form wrong?

  5. #5
    Join Date
    Aug 2012
    Posts
    70
    Can anybody help?

  6. #6
    Join Date
    Aug 2012
    Posts
    70
    Bump.............

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if a recordset is not updatable that usually means your underlying datasource (nearly always a query) does not have the primary key of all tables, so it cannot update the data.
    if you are using this as a search from then you shouldn't be entering data into bound controls. I'm surp4rised you are using a bound control for a searech form. the design paradigm sounds wrong to me.

    get the users to enter data, validate those choices are OK then use those choices to do your search. by all means use combo/list boxes to offer the user choices BUT dont' bind them to underlying datasources, merely populate the controls with relevant data.

    as an alternative consider using the search by example tool bar item.
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Aug 2012
    Posts
    70
    ok, I'll do a little research and try what you suggested

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •