Help with Access 2007 Event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • binui
    New Member
    • Feb 2010
    • 7

    Help with Access 2007 Event

    I have a data entry form in which there are two synchronized combo boxes - facility and line. Facility is a read only field and the data comes from a global variable which i had set while the user selects their respective facility button on the main form. Based on the facility, line combo box will be displayed (i wrote the code in the "on current" event).
    I usually enter 4-5 records and then save them together. Records were saved correctly. Today I entered 4 records and before saving them i had to confirm an entry i made in the 1st record , so i went back to the 1st entry using the back arrow and i noticed the line combo box selection was changing. Because of the oncurrent event, the line combobox is getting populated again.
    Please let me know which is the appropriate event to solve this problem (or any property which is similar to IsPostback propertyin .Net)
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    I think you guessed your problem. What exactly is your OnCurrent event doing? depending on your answer I'll probably tell you that you should instead be using a one time event to set control properties; events like button clicks and combo box changes. There is also a Form_Load() event

    Comment

    • binui
      New Member
      • Feb 2010
      • 7

      #3
      First of all, thanks for your reply. I solved the problem by specifying a query in the row source property of "line" which displays lines based on the facility, instead of writing code in an event and it is working fine. The data is being displayed correctly even when i am looking back at the records before saving them..

      Once again thanks for your input.

      Comment

      Working...