G
Guest
I'm a newby in need of assistance.
I'm creating a form based on a query which includes two table-based combo
boxes: one from an ID#[CityID], with a city name field [CityName] and city
population field [CityPopulation]; and the other from an ID#[CountyID],
county name [CountyName], and county populations [CountyPopulation]. I only
require that the form enter a value in ONE of the combo boxes. But, when I
enter data into the form without utilizing BOTH combo boxes, I get an error
message: for instance, if I only populate the 'CityID' query field with the
City combo box, I get an error message: "the MS Jet database engine cannot
find a record in the table 'tblCounties' with key matching field(s)
"CountyID'. However, if I complete BOTH combo boxes in the form--it records
everything just fine.
My question: How can I save my form completing only ONE of the CityID or
CountyID combo boxes while leaving null values in the fields produced by the
other/alaternate combo box (I have a subsequent field which utilizes the Nz()
function to look for the non Null value in one of the two fields I'm dealing
with here)?
I'm creating a form based on a query which includes two table-based combo
boxes: one from an ID#[CityID], with a city name field [CityName] and city
population field [CityPopulation]; and the other from an ID#[CountyID],
county name [CountyName], and county populations [CountyPopulation]. I only
require that the form enter a value in ONE of the combo boxes. But, when I
enter data into the form without utilizing BOTH combo boxes, I get an error
message: for instance, if I only populate the 'CityID' query field with the
City combo box, I get an error message: "the MS Jet database engine cannot
find a record in the table 'tblCounties' with key matching field(s)
"CountyID'. However, if I complete BOTH combo boxes in the form--it records
everything just fine.
My question: How can I save my form completing only ONE of the CityID or
CountyID combo boxes while leaving null values in the fields produced by the
other/alaternate combo box (I have a subsequent field which utilizes the Nz()
function to look for the non Null value in one of the two fields I'm dealing
with here)?