General discussion

Locked

Access 97 Tough one!

By MRA2 ·
I have a database with names ID Numbers and box numbers. I want to create a form with 50 boxes. Each box will have a name on it. When you click on the box, a form with that person's information should pop up. Is this possible in Access97???

Thanks,
Alan

This conversation is currently closed to new comments.

13 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 97 Tough one!

by Stillatit In reply to Access 97 Tough one!

Not particularly tough.

Create an array (hard code or load from a database, etc.) where you have in each row a "button text" and a "retrival key" entry.

Set up your primary form so that it has 50 buttons. On form activation, change the caption property on each button according to the array row corresponding to the button. Since you are doing this out of the array, it can be different each time, depending on how you are stuffing the array.

On click of any button, retrieve the record with the key in the appropriate row, and go to the next form.

Note that you can do this with buttons, fields, or labels. All you need is something which will respond to a "click" event.

Good luck.

Collapse -

Access 97 Tough one!

by MRA2 In reply to Access 97 Tough one!

The question was auto-closed by TechRepublic

Collapse -

Access 97 Tough one!

by Dr. Dale In reply to Access 97 Tough one!

I'm not exactly sure what you mean by "box," but one thing you could do is have a command button for each name. On click, the command button would open a form with that person's information. Since there is a one-to-one correspondence between button and form, this would not be difficult at all. When you add a button to a form in Access 97, it brings up a wizard that will guide you through the process of linking the form to the button.

Collapse -

Access 97 Tough one!

by MRA2 In reply to Access 97 Tough one!

The question was auto-closed by TechRepublic

Collapse -

Access 97 Tough one!

by Bob Sellman In reply to Access 97 Tough one!

You can take the brute force method and put 50 boxes or buttons on a form, each tied to bringing up a form with that person's info on it by tying code to each button (on click) or box (on got focus) to open the personInfo form with the filter that ID number = whatever is appropriate for the button or box activated.

But why not make it easier to use? Make a form that has an area to display the details. Include on the header or footer a combo box that lists the names available. When the combo box is updated, do the following:

' set filter on
me.filter = true
' set filter to select the one name
' selected in the combo box (me.cboFindName)
me.filter = "[ID] = " & me.cbofindname
' cboFindName should include the ID as the
' firstitem it selects (even if only the
' name is actually displayed in the combo
' box).

If you don't want the user to be able to change any of the data, make the person's information a separate form that is a subform on the main form. That way you can set the edit property of the main form to true while it is set to false (no edits) on the subform.

Collapse -

Access 97 Tough one!

by MRA2 In reply to Access 97 Tough one!

The question was auto-closed by TechRepublic

Collapse -

Access 97 Tough one!

by Gary_W In reply to Access 97 Tough one!

I would advise against 50 boxes on a form. You need a search area instead to lookup the person you want first. Much cleaner user interface.

Have a look at the sample databases that come with Access, lots of examples there.

Gary

Collapse -

Access 97 Tough one!

by MRA2 In reply to Access 97 Tough one!

The question was auto-closed by TechRepublic

Collapse -

Access 97 Tough one!

by SanKulPune In reply to Access 97 Tough one!

Hello Alan,

Why not consider the option of using a 'Find Record' combo.

The combo will contain the list of all names. You select the name and the related record will be displayed in the form.

You can use the 'Combo Box Wizard' available in the form design to create a 'Find Record' combo.

I would be glad to provide any more assistance you may need in this regard.


SanganakSakha,
Simple And Effective Solutions To Small Problems, No QuickFixes.

Collapse -

Access 97 Tough one!

by MRA2 In reply to Access 97 Tough one!

The question was auto-closed by TechRepublic

Back to Web Development Forum
13 total posts (Page 1 of 2)   01 | 02   Next

Related Forums