Link to home
Start Free TrialLog in
Avatar of ShriramS
ShriramS

asked on

Userform

Can create a userform in MS Access 97 and if so how?

I found references to it in the help but not how to create it.

Thanx

Shri
Avatar of mgrattan
mgrattan

The easiest way to create a new form is to use the Form Wizard.  First, click the Forms tab, then click the New button and select Form Wizard.  Select a Table or Query on which to base the Form and follow the prompts to select other options such as the appearance and layout of the fields.
This is how to create a form in Access97 using the Wizard:


1      In the Database window, click the Forms tab.
2      Click New.
3      In the New Form dialog box, click the wizard that you want to use. A description of the wizard appears in the left side of the dialog box.
4      Click the name of the table or query that includes the data you want to base your form on.

Note   You don't need to do this step if you click the Form Wizard option—
you can specify the record source for the form in the wizard.

5      Click OK.
6      If you clicked Form Wizard, Chart Wizard, or PivotTable Wizard in step 3, follow the directions in the wizard dialog boxes. If you clicked AutoForm: Columnar, AutoForm: Tabular, or AutoForm: Datasheet, Microsoft Access automatically creates your form.

If the resulting form doesn't look the way you want, you can change it in Design view.  
      How?

Note   If you click one of the AutoForm options, Microsoft Access uses the autoformat you last specified, either in the Form Wizard or using the AutoFormat command on the Format menu in Design view.
The Form Wizard I mentioned above will give you a basic user data-entry form.  Is that what you want?  

You can also use forms to create switchboard-like menu systems with buttons and other navigational controls (TreeView, Tab, etc.).  Just click the New button on the Forms tab and start adding controls to the form.  You will, of course, need to understand how the controls are used and how to use Event Procedures (Access is Event-driven) to make full use of this feature.  Another option is to use the Switchboard Manager to have Access create the Switchboard for you.  You will find it in the menu under Tools, Add-Ins.
Avatar of ShriramS

ASKER

Yeah! I am aware of the forms but they are slightly different from VB forms which you find in Word, Excel and VB.

The forms are bound whereas a userform won't be bound and if a userform is maximised, all the windows don't maximise like with forms.

A userform is not an MDI child whereas all the forms seems to be.
An Access form can be unbound....just don't select a RecordSource.  Also, you can use the Popup and Modal properties of the form to keep the form one size without affecting the other forms in the database.  In addition, judicious use of the Maximize and Restore commands (methods of the DoCmd action) will help in keeping your forms looking the way you want.  Each form's OnOpen and OnClose events can be utilized to make sure that particular form is opened in the correct size using:

Docmd.Maximize

or

Docmd.Restore
What is it that you are trying to do?
What I am trying to do is simply display a list of cities. It all works fine - but for some reason, every time I load up the form, it duplicates the current record.

I made the form unbound but that prevented access to the list contents and when I made the form snapshot, it just didn't show any of the controls.

I figured if I could use a simple visual basic form, it might solve the problem.

Thanx

Shri
ASKER CERTIFIED SOLUTION
Avatar of BrianWren
BrianWren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial