Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ControlSource and saving to table

5 views
Skip to first unread message

Otie

unread,
Apr 2, 2005, 10:52:55 PM4/2/05
to
Is there a simple answer as to why my database will not save the data
that correctly appears in the AccountID textbox on a form to the table
when I set the AccountID.ControlSource =
DLookUp("[AccountID]","Expense accounts","[ExpenseAccountName] =" &
"'" & [Forms]![Expenses]![ExpenseAccountName] & "'")?

The number in the textbox is correct (it finds the proper index - id -
when I select the ExpenseAccountName). But when I save the record and
then look at the information in the Expenses table, the AccountID
information is incorrect - it has not changed when I change the
ExpenseAccountName data.

This is MOST frustrating and strange.

Thank you.


--


---
Allen


Ira Solomon

unread,
Apr 3, 2005, 1:41:46 PM4/3/05
to
Hi Otie:
Luckily the answer is simple.

You have not connected the account ID to the form.
The field on the form is connected to the lookup, which is just
floating there.

The form should have your table as the record source.
Create the ExpenseAccountName combo box with the combo box wizard.
One of the options in the wizard is to find a record.
The set the control source for the accountID text box to accountID.
Now when you select a name from the drop down box , the account ID
text box will automatically populate with the current number.
If you change the number and then click in another box the new number
will be saved.

Good luck

Ira Solomon

On Sat, 2 Apr 2005 19:52:55 -0800, "Otie" <otie_...@adelphia.net>
wrote:

Otie

unread,
Apr 3, 2005, 3:33:51 PM4/3/05
to
Thank you so much!


--


---
Allen

Free astrology software at:
http://www.astrowin.org

"Ira Solomon" <isol...@solomonltd.com> wrote in message
news:paa051h73mmbabu5n...@4ax.com...

0 new messages