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  

Handling No Existing Record



 
 
Thread Tools Display Modes
  #1  
Old February 8th, 2010, 07:20 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Handling No Existing Record

I have a chemical product DB with the following hierarchical structu

- ProductVendors. Each Vendor who carries a given Product.
- Products. MfrID, MfrPN, and ProductName of each Product.
- ProductContainers. The ContainerID and Qty of each Container in a Product.
- Containers. The Name, Size, and Unit of each Container.
- ContainerSubstances. The ID and % of each Substance in a Container
- Substances. The Name, CAS #s and Hazard Class of each Substance

When entering a new Product, I am unsure of how to handle cases when there
is no existing Container record, or subsequently if there is no existing
Substance record in the DB. I’ve thought of displaying another form/subform
based on Containers/ContainerSubstances for the former and Substances for the
latter, then requerying the upstream combo boxes, but it seems kludgy. Does
anyone have a better idea?

Thank you.

Sprinks

  #2  
Old February 9th, 2010, 03:27 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Handling No Existing Record

One thing that is often done (I think), is to put a small button with a plus
sign on it next to the combo where you choose a container.
If user wants to add a new container they click the button and a popup form
opens to add a new container. When the popup form closes, you requery the
combo for containers and put the just-added container name in the combo
ready for user to use.

You could also use the Not In List event of the combo to let user add a new
combo.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Sprinks" wrote in message
...
I have a chemical product DB with the following hierarchical structu

- ProductVendors. Each Vendor who carries a given Product.
- Products. MfrID, MfrPN, and ProductName of each Product.
- ProductContainers. The ContainerID and Qty of each Container in a
Product.
- Containers. The Name, Size, and Unit of each Container.
- ContainerSubstances. The ID and % of each Substance in a Container
- Substances. The Name, CAS #s and Hazard Class of each Substance

When entering a new Product, I am unsure of how to handle cases when there
is no existing Container record, or subsequently if there is no existing
Substance record in the DB. I've thought of displaying another
form/subform
based on Containers/ContainerSubstances for the former and Substances for
the
latter, then requerying the upstream combo boxes, but it seems kludgy.
Does
anyone have a better idea?

Thank you.

Sprinks



  #3  
Old February 9th, 2010, 03:50 AM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Handling No Existing Record

On Mon, 8 Feb 2010 11:20:06 -0800, Sprinks
wrote:

If Containers and Substances are in dropdowns, you could set
LimitToList to True, and then handle the NotInList event in case the
user enters a value that does not exist.
In A2007 there is a ListItemsEditForm property that can be helpful as
well.

-Tom.
Microsoft Access MVP


I have a chemical product DB with the following hierarchical structu

- ProductVendors. Each Vendor who carries a given Product.
- Products. MfrID, MfrPN, and ProductName of each Product.
- ProductContainers. The ContainerID and Qty of each Container in a Product.
- Containers. The Name, Size, and Unit of each Container.
- ContainerSubstances. The ID and % of each Substance in a Container
- Substances. The Name, CAS #s and Hazard Class of each Substance

When entering a new Product, I am unsure of how to handle cases when there
is no existing Container record, or subsequently if there is no existing
Substance record in the DB. I’ve thought of displaying another form/subform
based on Containers/ContainerSubstances for the former and Substances for the
latter, then requerying the upstream combo boxes, but it seems kludgy. Does
anyone have a better idea?

Thank you.

Sprinks

 




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


All times are GMT +1. The time now is 01:50 PM.


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