Solved

Step by Step instructions on building a dynamic form in Access

Posted on 2004-09-10
7
6,608 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
ID: 12027610
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
ID: 12027708
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
ID: 12028008
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 12

Accepted Solution

by:
pique_tech earned 125 total points
ID: 12029060
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
ID: 12030197
Great this is perfect... Thank you
0
 
LVL 4

Expert Comment

by:IDAnderson
ID: 12073947
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
ID: 12074068
Ian, thanks, I was able to find this property and was able to lock down the fields.

Thank you
Dennis
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

803 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