Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 23rd, 2006, 12:41 PM
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

Reply With Quote
  #2 (permalink)  
Old August 23rd, 2006, 01: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
Reply With Quote
  #3 (permalink)  
Old August 23rd, 2006, 01: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
Reply With Quote
  #4 (permalink)  
Old August 23rd, 2006, 02: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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Tables in RichTextBox katsarosj Pro VB.NET 2002/2003 13 March 14th, 2014 06: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 05:25 PM



All times are GMT -4. The time now is 05:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.