Fields required for table cause error

ZikO

Registered User.
Local time
Today, 11:45
Joined
Dec 15, 2012
Messages
41
Hi Guys,

I have a table, let's say tblBooking with only three ID fields that are foreign keys from other tables and are required.
The form frmBooking which is bound to this table has three combo boxes. Each combo box substitutes informative text with correct ID. The form is placed in a frmNavigationForm therefore in NavigationSubform. Additionally, the frmBooking has a subform that is a table version of the form frmBooking but I substitute ID with information from other tables--I use query to fill the fields.

When the main navigation form starts, I have to click on button to go to frmBooking. Somehow, the form generates error when I try to click on any of the combo boxes. One, I have accepted errors I can continue to fill combo boxes and save current record.

I spotted the the following
  • the error occurs when the form gets focus from the navigation button when the tblBooking is empty
  • If I manage to save current record and got to create a new record, there's no errors
  • If the tblBookings has already records, the form starts with the first and also there's no errors

The problem occurs when tblBookings is empty
 
Start over. Please tell us in informative, NON-technical terms what precisely you are trying to do. Things like "I'm trying to create a booking form that allows the user to select from a list of (something), and after that (does something else)."

We will also need the exact error message you are getting, and what actions lead up to that error.

It also kind of sounds like you have the subform set up...I won't say wrong immediately, but definitely weird.
 
Hi

I did try my best to explain the problem in details. I am sorry if I failed. I sorted this out anyway so I am going to explain what's happened.

The form I have been talking about is inside a navigation form and contains another subform. The form is bound to one of the tables that has fields that are required to fill.

What happened was that I was generating a booking code and put it automatically to one of the fields. The form became "dirty" even though I did not start to do anything with it because one of the fields was already filled by a VBA script. Unfortunately, the form is in navigation form and I had to click on one of the buttons to get to it. Consequently, the form was already dirty but did not received focus, whenever I clicked on anything, the form reported the problem as the required fields were empty.

Now, as I wait with the booking code until I "touch" anything on the form, the form is not in "dirty" stage and I can leave it or get its focus and start working.

I hope that makes sense!
 

Users who are viewing this thread

Back
Top Bottom