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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Unique Table Property with code?

Status
Not open for further replies.

hblabonte

Programmer
Oct 3, 2001
84
US
Is it possible to set the unique table property in VBA code behind a form?

I have several forms where I need to set one table, but notice that the option does not always remain saved. I'd like to ensure this is set. Does anyone know how to do this using VBA?

thanks in advance,

H. Barnes
 
Hi,

I'm having the same problem. Did you by any chance get this resolved?

We have tried using this method with our SQL backend:

Code:
me.uniquetable = "dbo.tblTableName"

Unfortunately putting the table name in the string does not enable the code to recognize the object owner.

I'm very new at this, so if anyone can give a hand it would be really appreciated.

Theresa
"An Access 97 programmer trying to figure out Access 2000 ADPs." "Sleep is the best meditation." - Dalai Lama
 
Yes, I did finally resolve my problem. Here's a sample of the code to put in your form:

If Forms![formname].UniqueTable = "" Then
Forms![formname].UniqueTable = "Tblname"
End If

Good Luck!
-Heather
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top