Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

synchronizing my form 1

Status
Not open for further replies.

ngoz1

Programmer
Apr 19, 2002
19
GB
Hi

I have a continous form called subcase. The primary key is subcaseID(autonumber) which is a foreign key in a form called 'further details'.

i created a command button next to each record in 'subcase' which i hoped that on clicking opens up into a related record in the further details form. but i cant understand why the subcaseID field(foreign key) in the 'further details form' is empty rather than being automatically updated
 
I assume you're talking about when adding new 'futher details' records?

If 'further details' was a subform on Subcase as a main form, then setting the LinkChild/Master properties of the subform would handle this automatically.

Otherwise you've got to supply the code to force the subcaseID within 'further details' to match the selected record on the subcase form.
--Jim
 
Provided the RelationShips are properly set you may simply follow the subform wizard.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi Jsteph

Thank you so much for your reply.The reason i dont want to make further details a subform to subcase is because there are too many fields in it( further details) and so it becomes cumbersome for the user to have to keep scrolling horizontally to see or enter every thing within a particular record or is there a way around this

with regards to using a code to force a SubcaseID match- im not very good with programming, is there a code that i could just cut and paste and if so where would i put it

Thanks in advance


 
A sub form doesn't have to be in datasheet view. You can lay the controls out as you would on any normal form.

Hope this helps.
 
ngoz,
As earthandfire said, you can put the subform on the mainform and have it in any view you like, Single, Continuous, or Datasheet.

If you want to go with a separate form, the easiest way (though not necessarily the best) would be to have the below in the BeforeInsert event of the FurtherDetails form:
Code:
me.subcaseID = forms!subcase!subcaseID
Here you must make sure that the subcase form is open whenenver you'd be inserting into Furtherdetails, or handle cases where it's not
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top