hi,
This may be a very basic question,but please help me..
I have two tables tablel01 and tabel02,which have one-to-Many relationship(table01 is "one" side)
table01 table02
field1-Autonum field1-Autonum
field2-Text field2-Number(forign)
field3-Text field3-Text
I have related these tables,field size properties of the relating field are set to "long integer"
I have added data to the table01 using,
set rs=db.Openrecordset"table01"
rs.AddNew
rs("field2").Value=Variable1
rs("field3").Value=Variable2
rs.update
Its OK..
but when I am adding data to the table02 using,
set rs=db.Openrecordset"table02"
rs.AddNew
rs("field2").Value=Variable1
rs("field3").Value=Variable3
rs.update
Error occurs "data type mismatch".I have understood that table02 foreign key has number data type and I have assigned a text fied.please tell me how to enter data to the table02's foreign key?????
This may be a very basic question,but please help me..
I have two tables tablel01 and tabel02,which have one-to-Many relationship(table01 is "one" side)
table01 table02
field1-Autonum field1-Autonum
field2-Text field2-Number(forign)
field3-Text field3-Text
I have related these tables,field size properties of the relating field are set to "long integer"
I have added data to the table01 using,
set rs=db.Openrecordset"table01"
rs.AddNew
rs("field2").Value=Variable1
rs("field3").Value=Variable2
rs.update
Its OK..
but when I am adding data to the table02 using,
set rs=db.Openrecordset"table02"
rs.AddNew
rs("field2").Value=Variable1
rs("field3").Value=Variable3
rs.update
Error occurs "data type mismatch".I have understood that table02 foreign key has number data type and I have assigned a text fied.please tell me how to enter data to the table02's foreign key?????