Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Did you see that I tried to reproduce the error you describe and no new ID is generated?

  2. #17
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    Even I think you are not able to express my seld properly...

    1. The Issue is not about the records saving after clicking the save button - "It is working all fine..."

    2. The issue i about the search button..

    3. After searching, The details u use to search also take new id and save in the DB after clicking the "Add record" button....


    Still Cant understand

  3. #18
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Ok . . .

    Tell me step by step what to do.

  4. #19
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    1. Once Click on the "Add new" button.
    2. Put the date and agent name.....
    3. As soon as you choose a date, a new ID is generated..."remember this id"
    4. Now click search... you will get the result...
    5. Now again click on "add new"....
    6. Now go to the data table and click "refresh all".... you will find the ID there even if you dint save it ....




  5. #20
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    @Robeen... need help, I mentioned the Step by Step procedure...

  6. #21
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Sorry Hitesh. I didn't check the forum over the weekend. I'll work on it this morning & let you know.

  7. #22
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    When I do Step 4 - I get no record.
    The first three steps worked just as you said.
    Step 4 shows no record - just a blank (ID = 'New') record.

    In Step 5 - when I clicked 'Add Record' - I was not surprised that Access saved the record I was on.
    Even if you go to an old [previously existing] record on that Form with the Name & Date entered for your 'Add Record' - Access will save the new data that is on the screen.

    This is how it is SUPPOSED to work. It is not an error.

    If you DON'T want the record that you started entering after 'Add Record' - to be saved - you will have to put a 'Cancel' button on there so that when you navigate to a new - or old record - the new data on the screen will NOT be saved. You have to TELL Access that you do not want to save your changes.

    I hope this explains things?

    Let me know.

  8. #23
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    GR8... You understood me

    now is there any way that u can add that "cancel" code in the search button itself or add new button..

  9. #24
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    You CAN put cancel code wherever you want.

    BUT . . .

    You should not add code for 'Cancel' to either the 'Search' or 'Add New' buttons.
    Those buttons should do what they are supposed to do.

    Once you click 'Add New' to add a record, you should either complete adding the record - or Cancel [delete the record you were about to add and do not save it to the database.

    You should add a 'Cancel' button to your Form - so that if you decide NOT to add the record you started entering after you clicked Add New, then you can click the Cancel button and that record will not be added.

    When you add a new Command Button to the Form - Access will prompt you for what kind of button you want to add.

    You can choose 'Record Operations' and 'Cancel' & you will automatically have your Cancel button.

    Don't complicate your Form by putting contradictory code in your buttons [like putting code to Cancel -> in the Add New button]. This will create problems.

    It will be like putting the brake and accelerator into the same pedal in a car.

    You CAN do it . . . it might make a good practical joke . . . a nice little 'dhoka'!!

  10. #25
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Hi Hitesh!
    Were you able to solve this?

    I also noticed another post you had yesterday. Did you get some help with that?
    Let me know if you didn't & I'll look at it.

  11. #26
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    i did i robeen i did it mast.....
    I am at home right now/.. will go to office tomorrow and paste the Database so you see it


Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Complex Search Criteria
    By dutrac6835 in forum Queries
    Replies: 8
    Last Post: 06-23-2011, 04:11 PM
  2. Search Criteria
    By Meccer in forum Forms
    Replies: 1
    Last Post: 04-01-2011, 12:53 PM
  3. Search By Criteria - Flexible Criteria Fields
    By lilanngel in forum Access
    Replies: 0
    Last Post: 03-16-2011, 06:25 PM
  4. Search with multiple criteria
    By injanib in forum Forms
    Replies: 1
    Last Post: 01-16-2011, 11:51 PM
  5. search criteria in a form fails!
    By maxbre in forum Programming
    Replies: 2
    Last Post: 12-01-2010, 06:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums