Updating a table from a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use a subform to update an inventory transactions log. There
are two tables, "Inventory", and "Daily Transactions". The main form
contains an unbound control which is used to find the stock number in the
Inventory table. The subform has the date, quantity and price. When I try
to use a macro attached to a button on the subform to update the date in the
Daily Transaction table from the unbound control I get the following error:
"The object doesn't contain the automation object "Daily Transactions".

I don't know it this is significant, but I have reviewed the KB article on
referring to controls in subforms and I have tried alternate interpretations
of the syntax, but my Access will not leave the syntax ".Form![Date]" but
changes it to ".[Form]!Date".
 
If you are using Date as a field name, you should change it. Date is a
reserved word in Access. You are experiencing the pain of using reserved
words for field names.
 
Al,

It is difficult to follow what you are doing. You want to update the
Date field on the subform according to the unbound control on the main
form? And the unbound control on the main form is the stock number? So
how does that relate to the date?

You mention you are using a macro. I assume you are using a SetValue
action? If the macro is being run from an event on the subform, and
referencing a control on the main form, then probably you will use the
Parent! qualifier.

Can you give some more details, with examples, of what you want to achieve?
 

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

Back
Top