Hi Mark. What you are aiming to do makes perfect sense, so it will be
worthwhile taking the time to trace what's going on.
Suggestions to get you started:
1. Timing?
When are you setting the value of these unbound controls? The Open event of
the form would be as early as possible, so try that. Alternatively, you may
be able to just set their Control Source to something like:
=1
2. Data type?
If the values are numeric, try setting the Format property of these unbound
controls to:
General Number
or try Short Date if they are dates. This will help Access understand the
intended data type.
3. Bad names?
Make sure that none of the names used in the
LinkMasterField s/LinkChildFields could be misunderstood as a built-in
property. Bad names include Name (the name of the form), Date (VBA
constant), Section (a property of forms), etc.
4. Dynamically changed?
Under certain conditions, Access will reassign (or even deassign) the
LinkMasterField s and LinkChildFields , so check this has not happened. While
the form is open and displaying the problem, open the Immediate Window
(Ctrl+G) and check the values by entering something like this:
? Forms!MyForm![MySubformContro lName].LinkMasterFiel ds
Does it contain the expected name?
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Mark C" <he******@yahoo .com> wrote in message
news:md******** ************@co mcast.com...
I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound
to its own table. Each table has a field that can link them all together. I
have put an invisible unbound control on the master form that gets
populated on open. I set the link child and link master of each sub form to
the unbound control on the master form. When the form opens all the
subforms show are the first record in their underlying tables and not what
the field on the master should be linking.
On open of the master I have been successful in setting the record source
of each sub form to show what I want but I would like the link child and
link master to do it's job. Any help would be much appreciated.