command button to open same form record

G

Guest

Hello,
I hope I'll be able to explain clearly my problem.
I have a form with subforms, each of which lists a certain type of
references met in the record of the form. For example: An article ABC (record
1 of main form) refers to Indonesia. I will input Indonesia in the subform
'country references' of the main form Article ABC.
Now in my subform, I have command buttons that open the 'Country Profiles'
form for each country entered. Subform 'country references' is linked to the
field 'Country Name' in the 'Country Profiles' form.
To allow each article to have its own references in the subform, the ID
field of the article (Master) is linked to the ID field of the Country
Profiles form (Child) with no primary keys. It solved many problems,
duplication of references in all records, as well as their disappearence when
moving through the records.
(If you haven't fallen asleep by now) here is my problem: entering Indonesia
as a country ref. also in article DEF is now possible and creates another
Indonesia record in the 'Country Profiles' form. Clicking the command button
of Indonesia of article ABC will show the country Profile straightaway
(great), but clicking the one of article DEC will show a blank Country
Profile of Indonesia and I have to navigate trough all the Indonesia records
to find the one filled. Is there any way to get the filled record at once or
ideally, although with several 'Indonesia' records in the 'country
references' subform (for each article referencing Indonesia) open only A SOLE
'Indonesia' record in 'Country Profiles'?
If confusion has installed in your head, I apologise. Let me know if I have
to explain this further. Thanks a million for your attention.
 
S

Steve Schapel

Gen,

Well, I must admit I did get a bit lost with your description. I
generally find it easier to relate to information about the data and the
fields and tables, rather than to descriptions about form functionality,
which is always "second-hand". Anyway, I'll have a go...

If I understand you correctly, an Article can be referenced to more than
one Country. And you have information about each country in a Country
Profiles table? And each country can also obviously be related to more
than one Article.

Ok, what this means is you need a table to store each instance of a
Country being referenced from an Article. If it was mine, matbe this
table would be called CountryReferences or some such. At the least, it
needs to contain a field which can be related to the primary key of the
Articles table (ArticleID?), and also a field which can be related to
the primary key of the Country Profiles table (CountryID?). It is not
clear whether you have such a table, and in fact is seems that you may
not. If you don't, then getting one is your next step.
 

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