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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RE: Linking

Status
Not open for further replies.

access8

Programmer
Jun 21, 2002
27
US
I have an Access Project with is used as the front end and SQL Server is used as the back end. I created two forms and I am trying to link the subform to the main form. I created the stored procedure which is as follows:
Alter Procedure storEstimatePaymentLog
(
@ContNo nvarchar(50),
@EstNo nvarchar(5)
)

As
Select tblEstimateComments.CommentNo, tblEstimateComments.ContNo, tblEstimateComments.EstNo, tblEstimateComments.Comments,
tblEstimateComments.CommentDate
FROM tblEstimateComments INNER JOIN
tblEstimatePaymentLog ON
tblEstimateComments.ContNo=tblEstimatePaymentLog.ContNo
WHERE tblEstimateComments.ContNo=@ContNo and tblEstimateComments.EstNo=@EstNo

When opening the main form the subform displays the records but it creates duplicates and I cannot add or delete records from the subform. Is there a way to create a stored procedure where I can modify records in a subform?

Thanks
 
The JOIN is what complicates the process. Were you to use a simpler query, you could add and delete. I am not sure all the rules the compiler uses for 'can do' or 'can't do,' but I am sure they are good reasons. The delete could be done with VB to the underlying table and a requery done to update the visible data. If you have further questions, ask.

rollie@bwsys.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top