Solved

Step by Step instructions on building a dynamic form in Access

Posted on 2004-09-10
7
6,586 Views
Last Modified: 2008-01-09
I successfully loaded a table in access and created a form in Access.  I need my form to be more dynamic.  I need to be able to interact with the form so it loads data based on a search for a specific ID.  Once I have the correct ID I need to modify one of the fields in the table.
0
Comment
Question by:Good53
7 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
That question covers such a wide range of answers that it's difficult to answer easily.  Sounds like your just starting out though, so what I would suggest is simply using the Wizard to build a form based on the table (or query).  Then play around with that a bit so you can see what was done.

 Basically though the wizard will set the forms recordsource (where the form should get it's data from) and create controls with a controlsource (where the control should get it's data from) set to a feidl in the forms recordsource.

  Add/Updating, etc is built into Access forms.

  For finding a record, again there are lots of ways, but the simplest is to use a combo control.  The steps for doing that are in the on-line help.  See "How to find lookup a record" (think that's right).

Jim.
0
 
LVL 12

Expert Comment

by:pique_tech
Comment Utility
Your question is pretty general, so I'll offer a pretty general answer.

One way to do this is to have a combo box at the top of the form that filters the form's data after a selection is made.  This is quite easy to build using the combo box wizard, but to use the wizard requires that the form be bound.

Assuming your form is bound, you'd click on the combo box in the Tool Box, drop the combo box on you form (in design mode), and the wizard will open.  Select the third option ("Find a record on my form based on ... ") then click next.  Follow the rest of the wizard through.

For aesthetics, when I do this, I like to have this selector combo box at the top of the form in a form header and the data elements in the detail section.  When I open the form, only the header is visible, but the detail is not.  When I make a selection, I modify the code to reset the detail to visible.
0
 

Author Comment

by:Good53
Comment Utility
I have created the form and I am a new with access.  

I have a transaction ID that is in the form.  When I open my form I would like it to come up blank.  From that Point I would like to search for a specific transaction ID.  At that point I would need to modify one of the values in a different field  that would exist in the table based on the specific transaction ID entered.

Out of 10 fields in the table I need to modify 2.  I would like to make the remaing 8 Read Only in the form?



Actuall now that I am talking through this it seems I would need to write a query somewhere in this process.  The query would need to have a dynamic input that would allow me to pull in only the transaction ID I need.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 12

Accepted Solution

by:
pique_tech earned 125 total points
Comment Utility
Your proposal is one way to do what you need.  Let me expand on my earlier suggestion and see if it might not work for you too, and it doesn't involve a query.

Open the form in design mode.  Make sure the Toolbox is visible (it's the bar or box with the tools to add labels, text boxes, list boxes, etc. on it).  If it's not, then you can display it through View -> Toolbox.  Click on the Combo Box tool (it's by the checkbox tool).  Click on your form, probably near the top.  This should open the Combo Box Wizard.

Choose the third button ("Find a record on my form based on ... ") then click next.  Add the Transaction ID field to the right-hand box by clicking on the single arrow button ( > ) between the boxes.  Click Next.  The display should show a list of the values in this field now and a column header with the name of the field.  Click Next, and if you don't like the name Access supplies for you, type in one you do like.  Click Finish.  

Make sure all the other fields you want to view and change are on the form too.

When you open the form in View mode now, the combo box should be empty.  You can click on it to open it or type your value right in.  When you've clicked on a value or tabbed out of the field, the rest of the form should update to synchronize with the transaction id selected in the combo box.
0
 

Author Comment

by:Good53
Comment Utility
Great this is perfect... Thank you
0
 
LVL 4

Expert Comment

by:IDAnderson
Comment Utility
Good53,

In addition to the record find criteria you asked about fields being set to read only.

If the eight fields to be read only are constant, ie the same fields each time, you can click on the fields whilst in Form View (not Design View) and change the properties (menu - View, Properties, Data, Locked (set to yes)) to 'Locked', save the form and the fields will remain as read only.

regards,

Ian Anderson.
0
 

Author Comment

by:Good53
Comment Utility
Ian, thanks, I was able to find this property and was able to lock down the fields.

Thank you
Dennis
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now