Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 23rd, 2006, 11:41 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating tables within tables in access???

I have an Access database that I am using as the backend with ASP.Net
The Access DB contains fields such as "step#" "instructions" "date"
The problem I am having is some of the instructions contain data that not text. Some "instructions" will have yes/no, some will have 1 textbox, some will have 3 textboxes within that record to be filled out. How can I make this in Access and retrieve this in ASP.net? I guess you may call it a table within a table???
thank you
jc

  #2 (permalink)  
Old August 23rd, 2006, 12:23 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I think you need to resolve your data type and structure issues, and then code to pass those types and structures.

If you want this additional table, you would need to create one with all possible field values, and then link it to the main table. That way each record in the main table could have one or many instruction fields of various types.

Each record in the instruction table would have all fields in it, and some may be blank.

This sounds like a mess.

tblMain
MainID - PK
StepNo - Number of Text
Date - date

tblInstruction
InstructionID - PK
MainID - FK
FieldType1 - Y/N
FieldType2 - text
FieldType3 - text
...

Then when you pull tblMain.MainID, StepNo, Date, tblInstruction.FieldType1 etc Join On tblMain.MainID = tblInstruction.MainID you can concatenate all of the fields from tblInstruction and use the alias "Instructions" when presenting the data.

Does that help?


mmcdonal
  #3 (permalink)  
Old August 23rd, 2006, 12:25 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Sorry, that should be:

StepNo - Number OR Text


in tblMain.


mmcdonal
  #4 (permalink)  
Old August 23rd, 2006, 01:21 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, that makes perfect sense. I was thinking that i would need to make a separate table that has those conditions (y/n, textbox, textarea, etc). My problem was linking and associating them. Like how would step 1 in table main know that it requires a textbox, how would step 2 know that it requires a fill in table with 4 cols and 8 rows for data, how would step know know it requires a checkbox, etc? The date I am working with is a complete mess, i am now getting the structure correct, but this table has the most problems, because it requires some input. I hope i am making sense explaining this.
thanks for your help
jc



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Tables in RichTextBox katsarosj Pro VB.NET 2002/2003 13 March 14th, 2014 05:50 AM
Creating tables on the fly Keith Smith Access VBA 1 January 15th, 2008 10:49 AM
Help creating tables racin_vegas PHP How-To 1 January 19th, 2006 09:11 AM
Creating word tables, PLEASE help :D Cadey VB How-To 1 December 1st, 2003 08:31 AM
Creating Tables Programmatically stu9820 ASP.NET 1.0 and 1.1 Basics 10 October 22nd, 2003 04:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.