Automatically Populate Form Data

  • Thread starter Thread starter ctellis1
  • Start date Start date
C

ctellis1

Guest
I know this probably is a very basic question--apologies, I'm trying to become "self taught" as much as possible and haven't seen this topic in any of the resources I've found so far. Any help will be very appreciated.

Is it possible to have data from one table in a database automatically populate a form linked to another table in the same database?

To explain: I have created a table and form that tracks each time a reporter calls our company with a question. One reporter may call an infinite number of times, and each entry is assigned an auto ID for tracking.

I also have created a second table for a "press list" of reporters when we need to contact them. (A reporter would only appear once in this list.)

Here's what I want to do: when a new call comes in, I'd like to start typing the reporter's name in the "inquiry" form and, if there is a match to the press list, have that reporter's contact information populate automatically on the inquiry form.

Hope that makes some sense. Again, any help is appreciated. Thanks in advance!

ctellis1@aol.com
 
Easiest Method of Doing this is to have the Reporter on your Inquiry form be a combobox.

With this method you can do the following.

Using the NotInList Event: Open a form to add the reporter to your list.

Use the Column Property to hold the information you will need to populate your Inquiry form.

Reduce Typos in name entry.
 
Thanks Travis.

I'm feeling stupid because I can't figure out the Macro it seems I should use.

Making the "reporter's name" field a combo box is fine...and I set up all of the columns I need in that box.

Then I'm stuck.

I can't figure out the macros to take the other 6 "identifying" fields from the combo box and place them into the corresponding fields on the inquiry form. The column property thing has me baffled.
 
Your first column is always refered to as 0 second as 1 etc Forms!SomeForm!CombName.Column (1)
HTH
 
Thank you as well Rich.

What seems to be giving me errors is any way I try to use an expression like that in a Macro. I can't get the steps right.

For example, one (out of six) field that I'd like to populate is e-mail (a text box on my inquiry form). I know the column in the combo box (6, counting from 0). What I can't figure out is the Macro to make that control pull the data from the combo box.

And again, sincere thanks for the help!
 
Don't use a macro here. Use the [Event Procedure].

Me.[EmailField] = Me.[ComboBoxName].Column(6)
 
I'm not having success on the "Event Procedure" process.

Your help has been so much appreciated that I hate to ask...but is there any additional explanation you can offer about how you would use the feature in a case like this?

Again, many, many thanks!

Chris

ctellis1@aol.com
 
search this forum for more information on "populating" or "automatically filling in data" on forms. There have been many posts here on this topic, most of them offering the same/similar response.

good luck
 

Users who are viewing this thread

Back
Top Bottom