combo box

  • Thread starter Thread starter maximus
  • Start date Start date
M

maximus

Hi.
I have a form bounded to table. There are 5 combo boxes on
that form. When I try to add a new record, only if it is
first record, everything is fine, but if I try to add more
records, combo box ,which pulles IDs from table tID, is
giving me the message (as I type first number in)that
record can't be added or changed, and that referential
integrity rules require a related record in table tID.
When I click "OK" on message box , it reapears again and
after clicking "OK" again, it allowes me to enter rest of
the numbers. Then , when i come to neht combo box and try
to insert string value in i moves focus on same combo box
but for previous record. Then I delete entered string and
go to combo box in current new record and add string with
no problem. Everything is written down to table correctly,
I'm just trying to avoid those errors somehow.
Database is SQL 2000, front-end Access 2000.
Please help.
Thank you
 
Hi.
I have a form bounded to table. There are 5 combo boxes on
that form. When I try to add a new record, only if it is
first record, everything is fine, but if I try to add more
records,

How are you getting to the "new record"? It sounds like you're
updating the same record over again!
combo box ,which pulles IDs from table tID, is
giving me the message (as I type first number in)that
record can't be added or changed, and that referential
integrity rules require a related record in table tID.

Three questions:

- What is the Recordsource property of the Form?
- What is the Control Source of this combo box?
- What is the Rowsource property of this combo box?
 
-----Original Message-----


How are you getting to the "new record"? It sounds like you're
updating the same record over again!

I'm getting to new record by scroling down to the last row
marked with *
Three questions:

- What is the Recordsource property of the Form?
- What is the Control Source of this combo box?
- What is the Rowsource property of this combo box?

Recordsource for the Form is table tCrossRefID.
Control source for combo box is XRefID column of table
tCrossRefID.
There is no Rowsource property of combo box,but when i try
to put select statement "SELECT TOP 100 PERCENT ID FROM
dbo.tID"(Table tID contains all the IDs from which I
should chose one in problematic combo box), I get same
problem.
 
There is no Rowsource property of combo box,but when i try
to put select statement "SELECT TOP 100 PERCENT ID FROM
dbo.tID"(Table tID contains all the IDs from which I
should chose one in problematic combo box), I get same
problem.

A combo with no RowSource has nothing in it! I'm REALLY confused now
at what's going on.
 
It's true that combo box with no RowSource has nothing in
it.
What I'm trying tom say is that it doesn't metter if I
have Rowsource or not I still get the message "Referential
integrity rules require a related record in table tID".
 
Hi.
I have a form bounded to table. There are 5 combo boxes on
that form. When I try to add a new record, only if it is
first record, everything is fine, but if I try to add more
records, combo box ,which pulles IDs from table tID, is
giving me the message (as I type first number in)that
record can't be added or changed, and that referential
integrity rules require a related record in table tID.

What happens if you click on the dropdown arrow and select an ID from
the box?
When I click "OK" on message box , it reapears again and
after clicking "OK" again, it allowes me to enter rest of
the numbers. Then , when i come to neht combo box and try
to insert string value in i moves focus on same combo box
but for previous record.

This I don't understand at all. You click on one combo box, or tab to
it, and the form sets the focus to a DIFFERENT combo box? Or is it
displaying the data for another record? Do any of the combos have a
Default property set?
 
Same thing...
-----Original Message-----


What happens if you click on the dropdown arrow and select an ID from
the box?


This I don't understand at all. You click on one combo box, or tab to
it, and the form sets the focus to a DIFFERENT combo box? Or is it
displaying the data for another record? Do any of the combos have a
Default property set?


.
 
I have a form bounded to table. There are 5 combo boxes on
that form. When I try to add a new record, only if it is
first record, everything is fine, but if I try to add more
records, combo box ,which pulles IDs from table tID, is
giving me the message (as I type first number in)that
record can't be added or changed, and that referential
integrity rules require a related record in table tID.

I wonder if the fields in these tables are what you think they are.
Are these tables both in SQL/Server (as I guess from the dbo. part of
the table name)? Do you have a relationship established between the
tables? You haven't use a <yuck, PTOOIE!> Lookup Field have you?

I'd guess that you're getting the error message that a related record
is required in table tID because... a related record actually IS
required in tID, and for whatever reason your combo box isn't
providing it.

Another possibility is that the Form itself is corrupt. You might try
rebuilding the form from scratch.
 
-----Original Message-----


I wonder if the fields in these tables are what you think they are.
Are these tables both in SQL/Server (as I guess from the dbo. part of
the table name)? Do you have a relationship established between the
tables? You haven't use a <yuck, PTOOIE!> Lookup Field have you?

I'd guess that you're getting the error message that a related record
is required in table tID because... a related record actually IS
required in tID, and for whatever reason your combo box isn't
providing it.

Another possibility is that the Form itself is corrupt. You might try
rebuilding the form from scratch.


.
I don't have any Lookup Fields, tables are in SQL Server
and I copied fields from old form and pasted them into new
one and now it works! I guess form was corrupted as you
said. Thank you!
Now I have to recreate at least 2 more forms :(
 
Back
Top