Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question: Can't add new records?

Status
Not open for further replies.

KellyStee

Technical User
Jul 30, 2001
106
0
0
US
I have a form that includes a subform. The form records information related to the sale, the subform contain all of the individual sale items (hence, a 1 to many relationship). Problem is: I can't add new sales. I can add new details to current sales. I just can create a new sale. Sorry if this has been asked a zillion times, I did actually make an effort to search before posting.

Thanks in advance!!
 
Thanks for the response, Ken. I checked the property in the main form. "Allow Additions" is set to yes. "Data Entry" was set to no. I changed that one to yes just to see if that would help and it didn't.

Maybe if I gave you more background, you could help me. . .
I do remember at one point (I thought) that I could add new sales. I was still trying to get my queries straight though and I could swear it had to do with changing a query.

My main form query looks like this (pretty simple):

SELECT Sales.[Cashier ID], Sales.[Sale ID], Sales.[Sale Date], [Half-Price Day], Sales.[Payment Date], Sales.[Payment Amount], Sales.[Check Number]
FROM Sales, [Half-Price Day];

I have to include [Half-Price Day] which just holds only one value: a yes or a no (we sell clothes at half-price on a particular day).

My subform query looks like this:

SELECT [Sale Details].*, IIf([Half-Price]=-1,[Price]/2,Price) AS [Adjusted Price]
FROM [Sale Details];

The only other detail I can think to tell you is that the subform has a value of "Sale ID" in the "Link Child Fields" and "Link Master Fields" properties.

Do you see any obvious problems?

Thanks, again!
 
Hi

Have you tried just running the query:

SELECT Sales.[Cashier ID], Sales.[Sale ID], Sales.[Sale Date], [Half-Price Day], Sales.[Payment Date], Sales.[Payment Amount], Sales.[Check Number]
FROM Sales, [Half-Price Day];

and see if you can add a line?

I think you may find you have made it into a none updatable query by adding [Half Price Day]

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top