Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2003, 02:17 PM
Authorized User
 
Join Date: Jun 2003
Location: Neverland, FL, USA.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linking

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.C ontNo
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

slypunk

slypunk
__________________
slypunk
 
Old July 30th, 2003, 08:13 AM
Authorized User
 
Join Date: Jun 2003
Location: Neverland, FL, USA.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am still having a hard time trying to figure this out. May someone please help me?

slypunk
 
Old July 30th, 2003, 02:29 PM
Authorized User
 
Join Date: Jun 2003
Location: Neverland, FL, USA.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I GOT IT! Here is the stored procedure I used:
Alter Procedure storEstimatePaymentLog
    (
        @ContNo nvarchar(50),
        @EstNo nvarchar(5)
    )

As
  Begin
     Select * From tblEstimateComments
     Where ContNo=@ContNo and EstNo=@EstNo
  End


This will allow me to add/delete records + it will not create duplicates! Thanks for your help! :D

slypunk




Similar Threads
Thread Thread Starter Forum Replies Last Post
linking anukagni Access 1 March 28th, 2006 08:21 AM
Linking dates A17560127 SQL Server 2000 4 October 3rd, 2005 01:10 PM
Linking UserControls dhanyavnair Pro VB 6 2 December 1st, 2004 02:41 PM
Linking Problems mahulda ASP.NET 1.0 and 1.1 Basics 3 April 13th, 2004 02:45 PM
RE: Linking sherr8 SQL Server 2000 2 July 30th, 2003 02:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.