Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / February 2007

Tip: Looking for answers? Try searching our database.

Cannot add a record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron Weaver - 31 Jan 2007 22:57 GMT
I have a form with the following SQL statement:
SELECT Orders.CustomerID, Customer.FirstName, Customer.LastName,
Customer.Address, Customer.City, Customer.State, Customer.ZipCode,
Customer.Phone, Customer.Fax, Orders.OrderID, Orders.CustomerID AS
Orders_CustomerID, Orders.TodaysDate, Orders.StartDate, Orders.EndDate,
Orders.ArriveTime, Orders.StartTime, Orders.EndTime, Orders.Notes,
Customer.CustomerNumber, Orders.CustomerID, Customer.CustomerID,
Customer.Email
FROM (Customer INNER JOIN Orders ON Customer.CustomerID = Orders.CustomerID)
INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID;
I am trying to add an unbound combo box to the form above. I created a new
table, 'tblConfRooms'. This table contains the names of conference rooms. I
related the new table's primary key, RoomID with the table 'Orders' by adding
RoomID to it and creating an Enforced relationship. When I add the combo box
and try to add an order, I get the following error message: Error #3201
You cannot add or change a record because a related record is required in
'tblConfRooms'. I hope there is enough information here for someone to help
me with this.
Thanks
Damian S - 01 Feb 2007 04:00 GMT
Hi Ron,

Usually when you get this error after adding a lookup list and referencing
it, it is because you have left the default value of zero against the field
in the main table, in this instance, RoomID in the Orders table.  Remove the
default value of zero from this (as you don't have a Room with an ID of zero)
and it should work fine.

Damian.

> I have a form with the following SQL statement:
> SELECT Orders.CustomerID, Customer.FirstName, Customer.LastName,
[quoted text clipped - 15 lines]
> me with this.
> Thanks
Ron Weaver - 01 Feb 2007 16:22 GMT
Hi Damian
That was it.
Thanks

> Hi Ron,
>
[quoted text clipped - 25 lines]
> > me with this.
> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.