I'm having trouble figuring out what I need to do here. Basically, I
want to pull data from several different tables and send them to a form
using open args. However, the form that is being fed need to have
certain columns of data concatenated. Here is the code I have so far.
I'm sure it's not right because it doesn't work right.
Private Sub cmdEdit_Click()
Dim sSQL As String
sSQL = "Select RENTAL.[RID], RENTAL.[EVENTID], EVENT.[NAME]" & _
" EVENT.[FILENUMBER], RENTAL.[RENTALDATE], RENTALITEM.[RENTALID]" &
_
" RENTAL.[RENTALITEM], RENTAL.[RENTALTYPE]," & _
" RENTALITEM.[PRICEPERUNIT], RENTAL.[QUANTITY]" & _
" FROM RENTALITEM " & _
"WHERE forms![frmRentalSearch].[RID] = RENTAL.[RID]"
DoCmd.OpenForm "frmEditRental" , acNormal, OpenArgs:=sSQL
End Sub
Thanks for any help.
Fred
want to pull data from several different tables and send them to a form
using open args. However, the form that is being fed need to have
certain columns of data concatenated. Here is the code I have so far.
I'm sure it's not right because it doesn't work right.
Private Sub cmdEdit_Click()
Dim sSQL As String
sSQL = "Select RENTAL.[RID], RENTAL.[EVENTID], EVENT.[NAME]" & _
" EVENT.[FILENUMBER], RENTAL.[RENTALDATE], RENTALITEM.[RENTALID]" &
_
" RENTAL.[RENTALITEM], RENTAL.[RENTALTYPE]," & _
" RENTALITEM.[PRICEPERUNIT], RENTAL.[QUANTITY]" & _
" FROM RENTALITEM " & _
"WHERE forms![frmRentalSearch].[RID] = RENTAL.[RID]"
DoCmd.OpenForm "frmEditRental" , acNormal, OpenArgs:=sSQL
End Sub
Thanks for any help.
Fred
Comment