Dynamic forms, don't even know what this would be called

cheeseslice

New member
Local time
Today, 22:16
Joined
Jun 19, 2010
Messages
6
Hi,

I'm in the process of making a inventory control system, I have got my tables and relationships done and I'm now onto the forms but I need a bit of guidance.

I have a categories table, products table, products category table.

categories - catId, catName, parentId

parentId is to allow for sub categories e.g. 1, meat&fish, 0; 2, beef, 1; 3, pork, 1; 4, cod, 1 etc.

the products category table - prodcatId, catId, productsId

I hope that makes some sense.

What I need is the data to appear on a form for editing in the style of a spreadsheet, with the products grouped under first the main category, then sub category, I have put a tab control on the form and split each main category into it's own page, ideally I would like this to be dynamic too but for the time being I would be happy with just having the forms working.

If I was doing this in php it would be easy, so I assuming it's quite simple to do in vba but I just don't know what I should be searching for in google or the forums.

So basically what I need is for a loop to run some sql that will:


list first sub category
list products in sub category

list 2nd sub category
list products

etc.

and display editable content in the style of an excel spread sheet.

this is probably an obvious point but, the reason I this needs to be dynamic is because the user wants to be able to add as many sub categories as they need. I was orginally going to allow them to create main categories too but that might complicated things too much.

any help would really be appreciated
 
Microsoft have created several sample databases to help with specific topics, query's form's and reports.

In the forms sample database they have a form which has catergories and on selecting a category a list box is refreshed with showing what items can be found based on the select catergory. They are using queries and a refresh behind the form.

The link to the download is here:

http://www.microsoft.com/downloads/...5E-A29B-4A43-8508-78E549ECD14C&displaylang=en

This should give you the beginnings of what you need.
 

Users who are viewing this thread

Back
Top Bottom