mcdhappy80
Registered User.
- Local time
- Today, 19:29
- Joined
- Jun 22, 2009
- Messages
- 347
I have a form and since I change it's record source from table to query (with same data as the table and some more) I'm getting this error:
The error occurs when I try to select records from the third of mine three combo boxes I have on that form, and only when I'm on the blank (new) record.
On the second picture I'm giving You the database relations and I'll explain what is bound to what:
The main form was bound to table tblZahtev and now to qryZahtev which has all the records from tblZahtev plus related records from tables tblTipDokumentacije, tblPorodica and tblDete.
I've created the combo boxes by first creating lookup fields when I created tables and then when I created form from table the comboboxes were there.
The first combo box is bound to field tblZahtev.intDocTipID and its record source are two fields intTipDocID (PK), and txtTipDocNaziv from tblTipDokumentacije. This combobox works fine.
The second combo box is bound to tblZahtev.txtSifraDetetaID and its record source are tblDete.txtSifraDetetaID (PK) and Dete:[tblDete].[txtIme] & " " & [tblDete].[txtPrezime] (combined field). This combo box works as it should.
The third (the problematic one) is bound to tblZahtev.intPorodicaID and its record source are tblPorodica.intPorodicaID, and Potpisnik:[tblPorodica].[txtImePotp] & " " [tblPorodica].[txtPrezPotp] (a combined field).
When I'm on the existing record in tblZahtev and I try to change the value of tblZahtev.intPorodicaID via the combo box that works, but as soon as I switch to enter new record in tblZahtev, and try to select record from combo box Porodica I'm getting that error.
If I understand the error correctly I'm trying to select a record in the combo box which doesn't exist in tblPorodica but how can that be if the only records for selection in the combo box are those from the tblPorodica.
I really don't understand what is happening here. Every help is welcome.
Thank You.
The error occurs when I try to select records from the third of mine three combo boxes I have on that form, and only when I'm on the blank (new) record.
On the second picture I'm giving You the database relations and I'll explain what is bound to what:
The main form was bound to table tblZahtev and now to qryZahtev which has all the records from tblZahtev plus related records from tables tblTipDokumentacije, tblPorodica and tblDete.
I've created the combo boxes by first creating lookup fields when I created tables and then when I created form from table the comboboxes were there.
The first combo box is bound to field tblZahtev.intDocTipID and its record source are two fields intTipDocID (PK), and txtTipDocNaziv from tblTipDokumentacije. This combobox works fine.
The second combo box is bound to tblZahtev.txtSifraDetetaID and its record source are tblDete.txtSifraDetetaID (PK) and Dete:[tblDete].[txtIme] & " " & [tblDete].[txtPrezime] (combined field). This combo box works as it should.
The third (the problematic one) is bound to tblZahtev.intPorodicaID and its record source are tblPorodica.intPorodicaID, and Potpisnik:[tblPorodica].[txtImePotp] & " " [tblPorodica].[txtPrezPotp] (a combined field).
When I'm on the existing record in tblZahtev and I try to change the value of tblZahtev.intPorodicaID via the combo box that works, but as soon as I switch to enter new record in tblZahtev, and try to select record from combo box Porodica I'm getting that error.
If I understand the error correctly I'm trying to select a record in the combo box which doesn't exist in tblPorodica but how can that be if the only records for selection in the combo box are those from the tblPorodica.
I really don't understand what is happening here. Every help is welcome.
Thank You.