If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding new record to query
Hello there
I have table of citys with two fields CityID autonumber, city text(20) I've bilt the current query for adding new city: PARAMETERS prmCity TEXT(20) INSERT INTO Citys(City) SELECT prmCity as expr1 But it don't work It says that i tried to enter NULL to require field What i need to do to fix it? any help would be useful |
#2
|
|||
|
|||
Adding new record to query
Hi,
Try INSERT INTO Citis(city) VALUES( prmCity ) If there is a required field, other than city, that is designed to not accept NULL, you have to supply it too (or a not null default value). INSERT INTO Citis(city, otherField) VALUES( prmCity, otherValue) Hoping it may help, Vanderghast, Access MVP "Roy Goldhammer" wrote in message ... Hello there I have table of citys with two fields CityID autonumber, city text(20) I've bilt the current query for adding new city: PARAMETERS prmCity TEXT(20) INSERT INTO Citys(City) SELECT prmCity as expr1 But it don't work It says that i tried to enter NULL to require field What i need to do to fix it? any help would be useful |
Thread Tools | |
Display Modes | |
|
|