Solved

Step by Step instructions on building a dynamic form in Access

Posted on 2004-09-10
7
6,628 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 58
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property 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.

728 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