Solved

linked forms not working in access 2000

Posted on 2003-10-31
8
635 Views
Last Modified: 2007-12-19
i used the form wizard to make a linked form but it won't allow me to enter any data in a new record. tells me i can't add or change a record because a related record is required.  if i enter the data into the tables directly and then call up my form then everything is ok.  the funny thing is i made other linked forms in the past but i don;t remeber what i did to make it work. i knoiw i wrote some vb code for child and parent but i am missing something obvious or is there something i have to change in the form properties?

Please help- its sad when you can't remember!
0
Comment
Question by:pele4483
  • 4
  • 3
8 Comments
 
LVL 39

Expert Comment

by:stevbe
ID: 9657774
are the link child and link master properties set ?
are the fields you are using to link present in the record source for each form?

Steve
0
 

Author Comment

by:pele4483
ID: 9658132
this is not a subform where master and child properties are available.  there is a command button that needs to be pushed that opens the linked form.  i made two simple tables and set up a one to many relationship between the two and used the form wizrd with linked forms set to test out the code, it only took a few minutes and you will see that when you click on the button to open the linked form and you click on any of the fields(controls) the error pops up.  Someone on the google groups said that when you use the form wizard you won;t be able to edit new records and that is excatly what is happening, but i know there is a fix but i just can't remember it.
0
 
LVL 9

Expert Comment

by:svenkarlsen
ID: 9660851
OK, - lets see if I have got this right:

You have FormA, in which you view data from TableA

When you clcik a button, a new form (FormB) should pop-up with selected data from TableB, related to currently selected record in FormA

Is this what you need ?
0
 

Author Comment

by:pele4483
ID: 9661711
yes
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 9

Expert Comment

by:svenkarlsen
ID: 9662628
Fine,

Then:
 
 - make FormA based on TableA (no query reuired! - just make the form show the data of the table).
 
 - make FormB based on TableB (same as above)

 - in FormA, use the Button-Wizard to insert a button and choose the OpenForm track.


 - - - that should be it.

0
 

Author Comment

by:pele4483
ID: 9663473
i know there was more to it then that. there are visual basic routines for the child form and parent form in case the parent gets closed or the record of then main form gets changed so that the second form can also change automatically.
0
 
LVL 9

Accepted Solution

by:
svenkarlsen earned 50 total points
ID: 9663653
...... in case parent form gets closed:
    - you control that by making 'child-form' pop-up & modal, - then you can only work on child untill close

... in case the parent gets changed:
    - now you're more towards 'sub-form'-style, - everything is possible, but it's like any software project: you need
      to define what you require.

If you need to have some change in FormA be reflected in FormB, you have a selection of options: you may put the code in OnChange, OnUpdate and it may be put in the form events or the events of some control.

See: my problem is, that what you can't remember, I've never seen ;-)

I would be glad to help, but that would require that you specify what you need....
0
 

Author Comment

by:pele4483
ID: 9670190
i found the problem - my table in the one of a one-too many relationship had the linked field set to a default of 0 instead of null so everytime i called up the main form it would give me the error that i couldn't add or changed a record because that field did  exist even though i didn't manually ebter anything in yet.

Thanks foir your time anyways.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now