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

Is it possible to bind a table to a blank form?

Status
Not open for further replies.

hsitz

Programmer
Dec 14, 2000
396
US
I'd like to create a blank form and then bind a table to it by changing the table name that it's bound to in the properties of the form.

Unfortunately, that property is one that I see a little "lock" graphic to the left of, which I assume means it's locked, or read-only.

Does that mean that I have to use a wizard to create a form that's bound to a table? If not, how do I bind a blank form to a table?

-- Herb Sitz
 
I a little confused by what you are trying to achieve. If you have an existing form which you want to open with a different table, then open the form using OPal code and formOpenInfo type (see OPal Help). If you have a form with no master table at all, then presumably you also have unbound field objects on the form. In this case, again in OPal, use dmAddTable to add a new table to the form, and then set either the fieldname property or the tablename property of the unbound field objects. E.g. if someFld is the name of an unbound field, and SSN is a field in MYTABLE then code like this can be used (untested):

dmAddTable(":pRIV:MYTABLE.DB")
someFld.fieldName="SSN"

 
Thanks for the response. Basically I'm just trying to figure Paradox out. I'm an Access developer who's trying to learn how to work in Paradox.

I very often create blank forms in Access, and then just name the data source in the form's property menus. Sometimes I also start with an existing form made from one record source, and I just copy it and change the record source to an identically structured (but different) one.

I was just wondering how I can do the same thing in Paradox through the interactive menu system. I can create a form and bind it to a table using an expert, so it seemed to me there should be a way to bind it to a table on my own interactively. I guess there isn't. But thanks for your help, the tip on how to change the data source using ObjectPAL may prove useful.

Herb
 
Of course there is! This is very easy to do interactively. Depending on what version of Paradox you have, the menu selection may be a bit different. Basically, just pull up the form's data model and insert the table(s) - have a search through the menus with the form in design mode. Also make sure that the developer mode is set to "advanced". All this "point and click" data model stuff has been around since 1993 in Paradox. I thought you were trying to write a script which created a form, added a table, some fields, etc. Anything available interactively is also available through code, which makes the product very powerful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top