?
Solved

Auto update upon insert

Posted on 2002-06-19
4
Medium Priority
?
258 Views
Last Modified: 2008-03-06
Is it possible to have access auto update field values based on what the user has already input.  For example, if there are three fields: A, B, C -> user is asked to input A and B, and have access then automatically update the value for C as the concatination of the string A+B.  Is there anyway to run an auto query as the values are inputted. This of course works in excel, but does it in access?

On an unrelated note, is there a way to use the date field for only month and year or would that have to be text.

Thanks
0
Comment
Question by:salibes
[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
  • 2
4 Comments
 

Accepted Solution

by:
Deebz earned 280 total points
ID: 7092721
Place C.Requery in the onchange event of both fields A and B.  "C" will have to be created with field criterias limited by the value of A and B.  

You can create a Year/Month value from a date with this code:  Month([YourDate]) & "/" & Year([YourDate]).  Yes, it would turn it into a text field.
0
 

Author Comment

by:salibes
ID: 7093433
can C be a text box instead of a list box.  If yes, what is the code, and would i put it in control source?
0
 

Expert Comment

by:m_bizon
ID: 7093454
You could put a query in the control source for the listbox and use A and B as parameters of that query.  Make sure to use the [xxx] when refering to A and B controls in your query.  This would be if C resides in a table somewhere.

Another way to change the contents of listbox C based on A and B would be to write a subroutine that populates the list box useing listbox.item.add (I beleive that is the syntax).  Then use that sub as the change event on A and B.

Hope this helps.
0
 

Author Comment

by:salibes
ID: 7093475
Thanks,

but , I want to have a value show up in a text box , not listbox.  if in a listbox i want it to become default selected.  I'd rather have it in a textbox, is this possible?
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

762 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