Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic field in table

Status
Not open for further replies.
Mar 31, 2003
22
EU
Hi,

I have a table called ´tblTest´ with 3 fields,
TestID, TestName, TestValue.

The problem is with the field ´TestValue´, I want the type to be able to change for each new record

Example...
TestID TestName TestValue
------- -------- ----------
1 TestA 3.14(single)
2 TestB valueB(value could be text, int, single or OLE).

I presume I would need a second table with a field called ´Type´ listing all the types and some sort of link to tblTest.

Your help is appreciated….
 
Access has a Type called Variant which take anything and everything.
 
Hi,

I know in VBA there is a type variant but what would i declare the field type in table design.

thanks
 
I'm not certain that you can at table level - never done it..

I have used Text as the field type at tablbe level and variant or set a type at form level.

I had a quick look in help and this is all I could find of interest...
The "VALUE" reserved word doesn't represent a data type defined by the Jet database engine. However, in Microsoft Access or SQL queries, the VALUE reserved word can be considered a valid synonym for the Visual Basic Variant data type.

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top