Simple input sub-form problems

S

Simon

Hi

This has been driving me nuts for weeks. What I'm trying to achieve is a
simple input sub-form, where the user is entering a single column of
figures, one value per record, but the screen needs to show several
read-only fields joined from other tables which describe each record. I also
want to keep the colour look and feel of the rest of the application. The
last requirement rules out the datasheet view, as it refuses to accept the
colour settings of the form, so I started looking at grid controls.

I tried several different controls, including MSListView and MSFlexGrid, but
surprisingly, none of them seem to support data entry, only display.

I then looked at using an embedded Excel sheet - I had it displaying right,
but when the user clicks on it to do the entries, the sheet "opens" and all
the colour settings are ignored.

I've now moved on to a continuous sub-form, which has all the colour
settings, and again I can populate it ok - but even if the value field is
made editable, the form still won't accept updates. I tried adding an
unbound textbox for the new entries, locking the bound field with the
current value in it, but when I enter a value in the unbound textbox, it
replicates to all records in the continuous form!

Please, this seems such a simple requirement - all I want is an editable
grid control that will take formatting. Surely this is possible in such a
functionally rich environment as Access?

All help gratefully received!
 
G

Guest

A subform in continuous form view should be fine. The inability to update the
subform most probably results from your basing it on a non-updatable query in
which you include the referenced tables. To get around this, for the
subform's RecordSource use the table containing the single numeric column, or
a sorted query based on the table, and include a bound text box control in
the subform for the numeric column. For the values from the referenced
tables add unbound text box controls to the subform and call the DLookup
function to get the values from those tables, e.g. say you have a table
Widgets with a primary key column WidgetID and a text column Widget, with
your numeric column in the subform's table referencing the WidgetID key of
the Widgets table, then the ControlSource property of an unbound text box to
show the Widget would be:

=DLookup("Widget", "Widgets", "WidgetID = " & [YourNumberColumn])

This will be less efficient than basing the subform on a query which
includes the Widgets table, but the subform should be updatable.

Ken Sheridan
Stafford, England
 

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