Solved

linked forms not working in access 2000

Posted on 2003-10-31
8
636 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

896 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

14 Experts available now in Live!

Get 1:1 Help Now