MS Access Problem

  : : Radioactive Frog : : 10:56 30 Jul 2003
Locked

I have a very very simple database in access but i want to add a table or form that just lists the names. Then i can scroll through and press a button or double click on the name and it will take me to the form for that name (where all the information will be stored?!) is this possible?

Thanks

  The Transporter 10:59 30 Jul 2003

Create an unbound form, by double clicking on 'Create form in design view'

Now add the combo box(es) you need to set the parameters of the query.
Just click on the combo box button on the toolbar, the position your cursor
on the form, where you wish the combo box to be situated, then click and drag
to the size you want.

Follow the wizard, selecting the following.

'I want the combo box to look up the values in a table or a query.' > Next

Select the table which has the field you wish the combo box to have. > Next

Select the field you want by double clicking it. > Next and Next again

Give the combo box a label, this will be the label which will appear on your form.
> Finish.

**************************
**************************

The next step is to add a command button to the form which will run the query.

To do this:

Just click on the command button on the toolbar, the position your cursor on the form, where you wish
the command button to be situated, then click and drag to the size you want.

Follow the wizard, selecting the following.

Categories - select 'miscellaneous' Actions -select 'Run Query' > Next

Highlight the query, you wish to run > Next

Give the command button either a picture or text. (You can change this later, if you change your mind.) > Next

Give the command button a name > Finish

Close, Name and save the form.

***********************************

Now set the following properties for the form.

To open the properties section of the form, in design view, right click on the upper left hand corner of the form,
where the two rulers meet a black square will appear along with a drop down list. Select properties.

Select the 'Other' tab. In the Popup property box, click Yes. In the Modal property box, click Yes.

Select the 'Format' tab.

In the BorderStyle property box, select Dialog. If you select the Dialog setting, the form has a thick border and
can include only a title bar and a Control menu. The form can't be maximized, minimized, or resized.

*************************************

Now add the parameter(s) to the query.

Open the query in design view.

In the parameter row under the field you wish to set the parameter for, right click in this section and select 'Build'


In the three columns (boxes) at the bottom of the Expression builder in the first column, select the unbound form
you have just made, by highlighting it. In the second column select the name of the combo box you made on the form,
which corresponds to this parameter. Double click this, this will place it in the top of the window area. Press OK.

The parameter should now appear in the area selected.

Close and save the query.

*************************************

Open the form, make a selection from the combo box and press the command button to see if everything is working.

**************************************

Now, Create a macro or event procedure that opens the form, when you wish the query to be run.

**************************************

  : : Radioactive Frog : : 14:21 30 Jul 2003

thanks very much for your reply but i am not too sure if this is exactly what i want to do.

Already i have a text box in a form that just shows the name. So if i have 10ppl in the db then i have 10 white boxes with names in. What i would like to do is have a button next to the box so that whoever is in the box has their information shown when i press the button?

thanks

  whybe 16:45 30 Jul 2003

How about this as a possibility. Create a separate table within the same database.Entering all the information on the people you want.
Set primary keys for both tables,must be of the same field type, suggest the persons name field or Autonumber field.
Close both datasheets.
On the database opening page click Relationships
(little boxes linked together) You will be asked which tables to. Double click on both.
Click and drag the Primary key field from your Name table to the PK of your details table.
You should get a line with a 0 at one and an infinity sign at the other. A box will appear asking about the relationship. Make sure box One to Many is ticked and also data integrity is ticked. Click ok or save and close.
Open your Name table and you should see a + before the first column, click on the and it will open your subdatasheet with the information you need.
I hope!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

Awful clip art from 1994 is being tweeted every hour by a bot

iPhone X vs Samsung Galaxy Note 8

Les meilleurs navigateurs internet 2017