A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Shared Data Types



 
 
Thread Tools Display Modes
  #1  
Old January 27th, 2010, 05:53 PM posted to microsoft.public.access.tablesdbdesign
oldblindpew
external usenet poster
 
Posts: 128
Default Shared Data Types

I'm anticipating something like this:

PERSONS
PersonID
Person fields...

REQUESTS
RequestID
RequestDescription
RequestType

RESPONSES
ResponseID
RequestID
PersonID
Response

I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. I have
set aside the RequestType field as some sort of flag to indicate the kind of
response expected for each request.

Question: Which data type should I use for the Response field? It seems
like Number would work, but an example I've seen used Text.

Bonus Question: Is there a preferred way (sample code?) to make use of the
RequestType to convert the Response into the correct value of the correct
type?

Thanks,
OldBlindPew
  #2  
Old January 27th, 2010, 06:54 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Shared Data Types

If I recall correctly, Duane H. did something like this in his At Your
Survey database/application:

http://www.rogersaccesslibrary.com/f...osts.asp?TID=3

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"oldblindpew" wrote in message
...
I'm anticipating something like this:

PERSONS
PersonID
Person fields...

REQUESTS
RequestID
RequestDescription
RequestType

RESPONSES
ResponseID
RequestID
PersonID
Response

I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. I have
set aside the RequestType field as some sort of flag to indicate the kind
of
response expected for each request.

Question: Which data type should I use for the Response field? It seems
like Number would work, but an example I've seen used Text.

Bonus Question: Is there a preferred way (sample code?) to make use of the
RequestType to convert the Response into the correct value of the correct
type?

Thanks,
OldBlindPew



  #4  
Old January 28th, 2010, 12:35 AM posted to microsoft.public.access.tablesdbdesign
oldblindpew
external usenet poster
 
Posts: 128
Default Shared Data Types

Yes, that's the example I've been studying. He uses Text for his response
field data type, and I was hoping to flush out a reply on why one might
prefer Text over Number, even if Number seems a more likely candidate. Also,
he does have a field for QuestionType, but so far I have not found any way
for the user to access that field when creating a survey question!

Thanks,
OBP

"Jeff Boyce" wrote:

If I recall correctly, Duane H. did something like this in his At Your
Survey database/application:

http://www.rogersaccesslibrary.com/f...osts.asp?TID=3

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"oldblindpew" wrote in message
...
I'm anticipating something like this:

PERSONS
PersonID
Person fields...

REQUESTS
RequestID
RequestDescription
RequestType

RESPONSES
ResponseID
RequestID
PersonID
Response

I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. I have
set aside the RequestType field as some sort of flag to indicate the kind
of
response expected for each request.

Question: Which data type should I use for the Response field? It seems
like Number would work, but an example I've seen used Text.

Bonus Question: Is there a preferred way (sample code?) to make use of the
RequestType to convert the Response into the correct value of the correct
type?

Thanks,
OldBlindPew



.

  #5  
Old January 28th, 2010, 12:57 AM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Shared Data Types

Did you look at my response?

Steve


"oldblindpew" wrote in message
...
Yes, that's the example I've been studying. He uses Text for his response
field data type, and I was hoping to flush out a reply on why one might
prefer Text over Number, even if Number seems a more likely candidate.
Also,
he does have a field for QuestionType, but so far I have not found any way
for the user to access that field when creating a survey question!

Thanks,
OBP

"Jeff Boyce" wrote:

If I recall correctly, Duane H. did something like this in his At Your
Survey database/application:

http://www.rogersaccesslibrary.com/f...osts.asp?TID=3

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"oldblindpew" wrote in message
...
I'm anticipating something like this:

PERSONS
PersonID
Person fields...

REQUESTS
RequestID
RequestDescription
RequestType

RESPONSES
ResponseID
RequestID
PersonID
Response

I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. I
have
set aside the RequestType field as some sort of flag to indicate the
kind
of
response expected for each request.

Question: Which data type should I use for the Response field? It
seems
like Number would work, but an example I've seen used Text.

Bonus Question: Is there a preferred way (sample code?) to make use of
the
RequestType to convert the Response into the correct value of the
correct
type?

Thanks,
OldBlindPew



.



  #6  
Old January 29th, 2010, 05:18 AM posted to microsoft.public.access.tablesdbdesign
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Shared Data Types

If you only intend to store numeric values then you might want to use a
numeric field. If you choose to use a text field, you can convert it to
numeric using Val().

Duane Hookom
MS Access MVP

"oldblindpew" wrote in message
...
Yes, that's the example I've been studying. He uses Text for his response
field data type, and I was hoping to flush out a reply on why one might
prefer Text over Number, even if Number seems a more likely candidate.
Also,
he does have a field for QuestionType, but so far I have not found any way
for the user to access that field when creating a survey question!

Thanks,
OBP

"Jeff Boyce" wrote:

If I recall correctly, Duane H. did something like this in his At Your
Survey database/application:

http://www.rogersaccesslibrary.com/f...osts.asp?TID=3

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"oldblindpew" wrote in message
...
I'm anticipating something like this:

PERSONS
PersonID
Person fields...

REQUESTS
RequestID
RequestDescription
RequestType

RESPONSES
ResponseID
RequestID
PersonID
Response

I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. I
have
set aside the RequestType field as some sort of flag to indicate the
kind
of
response expected for each request.

Question: Which data type should I use for the Response field? It
seems
like Number would work, but an example I've seen used Text.

Bonus Question: Is there a preferred way (sample code?) to make use of
the
RequestType to convert the Response into the correct value of the
correct
type?

Thanks,
OldBlindPew



.

  #7  
Old January 29th, 2010, 06:38 AM posted to microsoft.public.access.tablesdbdesign
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default Shared Data Types

On Jan 27, 5:35*pm, oldblindpew
wrote:
Yes, that's the example I've been studying. *He uses Text for his response
field data type, and I was hoping to flush out a reply on why one might
prefer Text over Number, even if Number seems a more likely candidate. *Also,
he does have a field for QuestionType, but so far I have not found any way
for the user to access that field when creating a survey question!

Thanks,
OBP *

"Jeff Boyce" wrote:
If I recall correctly, Duane H. did something like this in his At Your
Survey database/application:


*http://www.rogersaccesslibrary.com/f...osts.asp?TID=3


Regards


Jeff Boyce
Microsoft Access MVP


--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.


Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.


You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"oldblindpew" wrote in message
...
I'm anticipating something like this:


PERSONS
PersonID
Person fields...


REQUESTS
RequestID
RequestDescription
RequestType


RESPONSES
ResponseID
RequestID
PersonID
Response


I expect the Responses to be Numbers, Currency, or Yes/No, however, all
responses go in the same field, which can have only one data type. *I have
set aside the RequestType field as some sort of flag to indicate the kind
of
response expected for each request.


Question: Which data type should I use for the Response field? *It seems
like Number would work, but an example I've seen used Text.


Bonus Question: Is there a preferred way (sample code?) to make use of the
RequestType to convert the Response into the correct value of the correct
type?


Thanks,
OldBlindPew


.


Really simple. You can store almost anything in a text field and then
use conversion functions to convert to another datatype. e.g. CInt
([MyTextField]) If you wanted it to be relatively painless, you could
store the intended type in a table somewhere, or in the Question
table...
 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.