Tony,Thanks for the reply.
Here is my existing sp code...
--------------------------------------------------------
ALTER PROCEDURE sp_SpotsRemaining2
(
@EventID int
)
AS
/* -- get maxsignup number
-- get total number of people signed up for specific event*/
declare @MaxSignup int
declare @EventCountStaff int
declare @EventCountStudent int
declare @EventCountNonStudent int
declare @SpotsRemaining int
declare @EventCount int
declare @EventCountTotal int
Set @EventCountStaff = 0
Set @EventCountStudent = 0
Set @EventCountNonStudent = 0
--get max number available for event
Set @MaxSignup = (SELECT dbo.Spess_tblCreateNewEvent.MaxSignup FROM
dbo.Spess_tblCreateNewEvent where
dbo.Spess_tblCreateNewEvent.EventID = @EventID)
--get number of spots remaining for all three categories
(Staff,Students,Non-Students)
Set @EventCountStaff = (Select count(*) FROM
dbo.Spess_tblEventSignup_Staff where
dbo.Spess_tblEventSignup_Staff.stfEventID = @EventID)
Set @EventCountStudent = (Select count(*) FROM
dbo.Spess_tblEventSignUp_Student where
dbo.Spess_tblEventSignUp_Student.EventID = @EventID)
Set @EventCountNonStudent = (Select count(*) FROM
dbo.Spess_tblEventSignup_NonStudent where
dbo.Spess_tblEventSignup_NonStudent.nonEventID = @EventID)
--calculate number of total spots filled
Set @EventCountTotal = @EventCountStaff + @EventCountStudent +
@EventCountNonStudent
--calculate number of spots remaining
Set @SpotsRemaining = @MaxSignup - @EventCountTotal
SELECT @SpotsRemaining
RETURN
------------------------------------------
If I understand correctly do I replace @EventID with
forms!formname!controlname?
Your example: forms!formname!controlname
becomes: forms!frmEventSignup!cmbstfEventID
Do I need to include a @ with my new predicate, can you insert the
correct code in the sp for me to show me how it should look. Also do you
know how to return the value from the sp into a form.
Thanks.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!