Using a subform to navigate between records.

  • Thread starter Thread starter Amir
  • Start date Start date
A

Amir

Hi there!

I have a form with a subform in it.

The form is in single form view, and the subform is in continuous view.
They both shows more or less the same fields, and the records
has a primary key named ReceiptEventID, which is unique,
and can identify a record.

How can I make the following:
1. When user clicks a line in the subform, the main form automatically
"jumps"
to that line itself (but not if it's dirty / new record).
2. The current record in the subform is colored in a different color,
according to the record which is now edited in the main form
(but not if it's a new record beeing edited).


Thank you!,
Amir.
 
Amir

I'm not clear what underlying tables and/or queries the form and sub-form
are based on. From your description, it sounds like they both point to the
same data ("both show more or less the same fields").

Could you describe what you want to accomplish, rather than how? The 'group
readers may be able to offer an alternate approach.
 
Hi, I'm trying to make the navigation easy, so I initially I used
a continuous form, but then I had problem because each time
a value in a combo box changed, the other combo boxes which
are dependant on that first combo box, changed their values
in ALL the lines (just in the display, not the real data).

I've considered solving it by using a subform that will display
the status of the current data, and turning the form to a single form but
now it came to my mind that I once saw a trick to solve this problem
in the continuous form, by using text boxes that are clones of
the real data, and they automatically set the focus to the
real control, waiting behind them, upon clicking on them.

Problem is I don't remember how exactly to the it,
and I can't make the text boxes to be updated correctly.
I've tried using the oncurrent event. but I only get errors.

I think that the continous form solution is better
than the soloution I've tried to make with the subform etc.

Have you got any idea of how I can solve it?
 
Amir

I should have been clearer in my request. I meant to ask what you want to
accomplish, without referring to ANY specific approach (combo boxes,
continuous forms, etc.). For example:

"I collect historical artifacts. In a database, I want a way to select one
and see basic information about it, as well as a list of previous owners."
 
Back
Top