?
Solved

linked forms not working in access 2000

Posted on 2003-10-31
8
Medium Priority
?
646 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 

Author Comment

by:pele4483
ID: 9661711
yes
0
 
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 150 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

762 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