Trying to save auto-populated data in a text table

R

rh44

I have a database designed to track exchanges of money that contains account
numbers, account names, bank numbers, date, transfer date, and dollar amount.
The user first enters in the transfer date and dollar amount, then the user
will use a combo box to select a "Reason for Transfer". Reason for Transfer
is the driving field for everything else.

After the user selects their Reason for Transfer, the account number, bank
number, and a few other fields auto populate from a table. These fields auto
populate into text boxes. The goal is to have all of the data above saved
into a table called Fund Transfer, however, my problem is that only fields
being saved are Reason for Transfer, Date, and Dollar amount. Essentially,
how do I get what is being displayed in the text boxes to also be saved?

My Combo Box has the following Row Source:
SELECT [GL Matrix].Expense, [GL Matrix].[Account Name], [GL Matrix].[Bank
Name], [GL Matrix].[ABA Number], [GL Matrix].[Account Number], [GL Matrix].
Reference, [GL Matrix].[GL Codes ALL] FROM [GL Matrix] ORDER BY [GL Matrix].
[Account Name] DESC;

My text boxes have the following as the Control Source:
=[Reason for Transfer].column(X)

I appreciate any help!
 
S

Steve Schapel

RH

Congratulations, you have this set up very well. It works fine just as
it is. Having the related data show on the form via the reference to
the Column property of the combobox, is a wonderful illustration of one
of the benefits of working with a relational database. What this means
is that you will always be able to retrieve this related data whenever
you need it for any purpose within your application. This can be by
using the same approach (referencing to a combobox's row source), or via
a query, or via a domain function such as DLookup, or several other
methods. As a result, you don't need to store it. In fact, to do so
would be wrong. I would recommend a "hands off" approach here.
 
R

rhansell10 via AccessMonster.com

Thanks Steve! I can display the information , but I'm having problems saving
values from [Reason to Transfer].column(x) to my table "Fund Transfer" table.
How would I go ahead and use the combobox's row source to be saved into my
table? And please, no VB :)

What I've tried so far is to use go into the Fund Transfer table and then
into the table design view. I selected Combo Box as my display control,
source is Table/Query, Row Source is "Reason for Transfer" without the quotes,
Bound Column is 1, Column Count is 1. I think this is close to my answer but
not quite correct. Anyone know?
 
S

Steve Schapel

Rhansell,

What I was trying, obviously unsuccessfully, to explain earlier was:
Don't do it. I don't think you will gwet anybody here who will give
instructions on how to "use the combobox's row source to be saved into
my table", because this is not a correct way of working with a database.
What you need to do is go to the design of the Fund Transfer table,
and *remove* the fields like account names, bank numbers, etc, they
should not be there. You need to have a field, which as far as can
gather would match the primary key field of the GL Matrix table, to
identify the related record. Apart from that, you do not want to
replicate the data into the Fund Transfer table
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top