A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Updating table with information



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2005, 12:26 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Updating table with information

I have a database with 3 tables:

1) ProductDetails - fields a

Autonumber
ProductType
Cost

2) Products - fields a

Autonumber
ProductCode
Sold (Yes/No field)

3) Sales Transactions:

Autonumber
ProductCode (lookup of Product table)
ProductType (lookup of Producttype table)
Quantity
Price

I have created a form that references the Sales Transaction table and allows
me enter in the sales tranactions i.e. client buying products.

The issue is - a particular product can only be sold once (thus the reason
for the SOLD field in the product table). I need some way to have the system
flag in the PRODUCT table against the product I have choosen in the form that
the item has been sold.

I am not sure how to do this seeing the form is referencing the Sales
TRansaction table not the Product table itself.

Any thoughts...help...greatly appreciated.
  #2  
Old December 15th, 2005, 10:08 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Updating table with information

Hi James,

Your Sales Transactions table does not reference the buyer at all. Are you
tracking sales with no
reference to the buyer? If yes, then consider this simple way to set your
Sold flag to Yes.

Add a button to your form called "Update Sold flag". It will call a query
coded thusly:

"Update Products set Sold = True where ProductCode in
(select ProductCode from SalesTransactions)

If your tablename really has a blank in it then change it to
SalesTransactions.

Also - I'd put the ProductType in the Products table rather than in the
SalesTransactions table.

HTH. Linda



"James T" wrote in message
...
I have a database with 3 tables:

1) ProductDetails - fields a

Autonumber
ProductType
Cost

2) Products - fields a

Autonumber
ProductCode
Sold (Yes/No field)

3) Sales Transactions:

Autonumber
ProductCode (lookup of Product table)
ProductType (lookup of Producttype table)
Quantity
Price

I have created a form that references the Sales Transaction table and
allows
me enter in the sales tranactions i.e. client buying products.

The issue is - a particular product can only be sold once (thus the reason
for the SOLD field in the product table). I need some way to have the
system
flag in the PRODUCT table against the product I have choosen in the form
that
the item has been sold.

I am not sure how to do this seeing the form is referencing the Sales
TRansaction table not the Product table itself.

Any thoughts...help...greatly appreciated.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help again from Ken Snell (Query) Randy Running & Setting Up Queries 22 August 29th, 2005 08:15 PM
Help with relationship plase Rock Database Design 5 July 4th, 2005 03:54 AM
Access combo box-show name, not ID, in table? write on New Users 30 April 30th, 2005 09:11 PM
Seeking some expert advice. HD87glide Using Forms 14 March 23rd, 2005 10:11 PM
unable to repair inobox Sudheer Mumbai General Discussion 1 February 20th, 2005 11:55 AM


All times are GMT +1. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.