cheeseslice
New member
- Local time
- Today, 06:46
- 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
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