Programming Access Forms

M

Mr. Camel

Hi,

Can someone tell me how I can add fields to a Microsoft Access form? I know
how to add fields to a Microsoft Access table using the MFC classes
CDaoDatabase etc., but I don't know how to update an Access form.

Please help.
 
D

Duane Hookom

You must open the form in design view and use the CreateControl method.
There is an example in Help.

Having to create controls at run-time is messy. I would recommend having an
invisible control that can be made visible when necessary.
 
M

Mr. Camel

Sorry, I probably was not clear about my question. Basically, I have this
Access database and I can add rows of information to a table in the database
using the MFC classes CDaoDatabase CDaoRecordset etc. using Visual C++. I
need to add a subset of these rows of information to an existing form. So my
question is, how do I do that from C++ code?
 
D

Duane Hookom

I'm not sure this is any clearer. You don't add rows to forms. Your forms
display rows of data/records from tables/queries. You can use DAO or SQL to
append records to a table but this has nothing to do with forms.
 
Top