469,904 Members | 2,078 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

How to remove Lookup property from table field with VBA?

I have an import routine that massages data from tables imported from other
Access MDB's. I came across one table where the imported table contained
Lookup fields - my import code barfed on it.

Does anyone have code to remove all lookup properties from a table with VBA
code? I figure I can add that to the beginning of my import code.

Thanks in advance.
Nov 13 '05 #1
2 3489
deko wrote:
I have an import routine that massages data from tables imported from other
Access MDB's. I came across one table where the imported table contained
Lookup fields - my import code barfed on it.

Does anyone have code to remove all lookup properties from a table with VBA
code? I figure I can add that to the beginning of my import code.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you wanted to change the Field "animal" in the Table "Animals", you'd
set the value of the Field's DisplayControl property like this:

currentdb.TableDefs("Animals").Fields("animal")._
Properties("DisplayControl") = 109

That will change the value to TextBox, which will remove the Lookup
characteristic of that Field.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQyiY9YechKqOuFEgEQLnIQCgjhmoW4xlcuW+u/MOHB1PL1TqMFEAnAgC
YVzXXBprULPW1IKImUqOwdm/
=pkoT
-----END PGP SIGNATURE-----
Nov 13 '05 #2
> currentdb.TableDefs("Animals").Fields("animal")._
Properties("DisplayControl") = 109


That did the trick. Thanks.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jim Stacey | last post: by
3 posts views Thread by my-wings | last post: by
2 posts views Thread by =?Utf-8?B?VEQgaXMgUFNQ?= | last post: by
2 posts views Thread by ApexData | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.