Access Database with Sub Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database that is a recipe list. It uses a Master Form with
an Auto Number for an ID and a Subform that connects to the master by the
AutoID. The Master has The autoID, Submitter Name, Recipe Name, Type of
Recipe and Instructions.

The Sub form is a list of the ingredients and is connected by the AutoID so
each record automatically has the Master's AutoID filled in a field..

Can I do this the same way on a website...can I have a form within a form
that is linked and will automatically fill-in the master's autoID to keep all
the ingredients with the master recipe?

If so, How do I get started?
 
If you're using the FrontPage Database Results Wizard, you would typically
create a Recipe page with one line for each recipe. On page 2 of the wizard,
you would define a custom query that produced a calculated field such as:

SELECT ..., '<href="ingredients.asp?id=' & [autoid] & '">' & [RecipeName] &
'</a>' as ingredientslink, ...

This will create hyperlinks such as
<a href="ingredients.asp?id=5">Marie's Joy Juice</a>

When the wizard ends, right-click the <<ingredientslink>> component in the
database results region and select Column Value Contains HTML.

Then, create the ingredients.asp page, which wil use another DRW, except
that this time on page 3 of the wizard you establish the id form field as a
criteria.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
 
Thx for your quick response. I'll try this. Will this allow data entry into
the database and fill in the master id to the ingredients table? Or is this
for viewing the results only?

Jim Buyens said:
If you're using the FrontPage Database Results Wizard, you would typically
create a Recipe page with one line for each recipe. On page 2 of the wizard,
you would define a custom query that produced a calculated field such as:

SELECT ..., '<href="ingredients.asp?id=' & [autoid] & '">' & [RecipeName] &
'</a>' as ingredientslink, ...

This will create hyperlinks such as
<a href="ingredients.asp?id=5">Marie's Joy Juice</a>

When the wizard ends, right-click the <<ingredientslink>> component in the
database results region and select Column Value Contains HTML.

Then, create the ingredients.asp page, which wil use another DRW, except
that this time on page 3 of the wizard you establish the id form field as a
criteria.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------

neenmarie said:
I have an access database that is a recipe list. It uses a Master Form with
an Auto Number for an ID and a Subform that connects to the master by the
AutoID. The Master has The autoID, Submitter Name, Recipe Name, Type of
Recipe and Instructions.

The Sub form is a list of the ingredients and is connected by the AutoID so
each record automatically has the Master's AutoID filled in a field..

Can I do this the same way on a website...can I have a form within a form
that is linked and will automatically fill-in the master's autoID to keep all
the ingredients with the master recipe?

If so, How do I get started?
 
No, what I describes is just for viewing.

You can try the Databse Interface Wizard for inputting, but it's quirky and
most designers want more specialized control over input. So, for
insert/update/delete applications, they write their own ASP.NET or ASP pages.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------


neenmarie said:
Thx for your quick response. I'll try this. Will this allow data entry into
the database and fill in the master id to the ingredients table? Or is this
for viewing the results only?

Jim Buyens said:
If you're using the FrontPage Database Results Wizard, you would typically
create a Recipe page with one line for each recipe. On page 2 of the wizard,
you would define a custom query that produced a calculated field such as:

SELECT ..., '<href="ingredients.asp?id=' & [autoid] & '">' & [RecipeName] &
'</a>' as ingredientslink, ...

This will create hyperlinks such as
<a href="ingredients.asp?id=5">Marie's Joy Juice</a>

When the wizard ends, right-click the <<ingredientslink>> component in the
database results region and select Column Value Contains HTML.

Then, create the ingredients.asp page, which wil use another DRW, except
that this time on page 3 of the wizard you establish the id form field as a
criteria.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------

neenmarie said:
I have an access database that is a recipe list. It uses a Master Form with
an Auto Number for an ID and a Subform that connects to the master by the
AutoID. The Master has The autoID, Submitter Name, Recipe Name, Type of
Recipe and Instructions.

The Sub form is a list of the ingredients and is connected by the AutoID so
each record automatically has the Master's AutoID filled in a field..

Can I do this the same way on a website...can I have a form within a form
that is linked and will automatically fill-in the master's autoID to keep all
the ingredients with the master recipe?

If so, How do I get started?
 
Back
Top