controlled form

  • Thread starter Thread starter mieke
  • Start date Start date
M

mieke

Hi,

I have a table with Products, ProductNumbers and some ProductAspects.
Now I would like to have a form with a pulldown box to choose a
ProductNumber from, and a subform to show the complete record of that
corresponding Product. It must be possible to edit a aspect at will. (I use
a copy of the table to capture changes to the data and verify first).
Would somebody show me the way to do it. A link to a working example would
be fine too, so I can learn from there.

Thanks in advance,
Mieke
 
Mieke:

You are a little vague, in your description, so if I am a little off-base,
please bear with me.

First, it sounds like you might be better to add a second table, such as:

tblProducts
ProductNumber (PK)
ProductName
ProductDescription

tblProductAspects
ProductNumber (PK) (FK)
ProductAspect (PK)
ProductAspectDetail

Then set your combo box's Row Source to be tblProducts and your subform
based on tblProductAspects. Use the ProductNumber field to link the
form/subform.

As for data verification, I'm not sure how you're doing this. You say you
are putting it in a separate table, so I would think you will want to do
something like this:

In the AfterUpdate event, of the combo box, add something like...

docmd.runsql ("insert into tblProductAspectsTemp (ProductNumber,
ProductAspect, ProductAspectDetail) from tblProductAspects where
ProductNumber = Me.[ComboBox1];")

Then base your subform off the Temp table. Your users make changes to the
Temp table, directly. You can verify the data, and update the production
table.

HTH.

Sharkbyte
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top