Too Many Arguments

I am not really sure what that means Gasman to be honest. The thing is however ugly it looks it has been working, and i just want to add another field - which i thought would be simple!
Well my thoughts were pass m_oRecordset to the function instead, and then you would have everything you need.?
If the recordset increases by a few fields, they are then automatically included.?

So once tried and tested, maintenance free for any new fields in the recordset, plus you do not have to worry about type when passing.?
Not something I have done yet, or likely to TBH, but certainly something I would try, if I was in your situation.?
 
Last edited:
Well my thoughts were pass m_oRecordset to the function instead, and then you would have everything you need.?
If the recordset increases by a few fields, they are then automatically included.?

So once tried and tested, maintenance free for any new fields in the recordset, plus you do not have to worry about type when passing.?
Not something I have done yet, or likely to TBH, but certainly something I would try, if I was in your situation.?

Thanks Gasman, sounds like it could be a great solution - but my grasp of coding is not that advanced sadly. Maybe withy all the self isolating i am going to be doing i could take a crash course!

cheers,

Ian
 
you'll do fine Ian. just make sure to crash on the bed in your own house and not on the cots in the back room here on the forum.
 
Well I would have hoped it would be no more than

Code:
Call DoRemote(m_oRecordset)

Public Function DoRemote(pRS as DAO.Recordset) ' or ADO if that is what you are using
Dim strCRD as String..... etc

With pRS
strCRD = NZ(.CRD)

Then just use your variables, or even the recordset fields direct if you can.?, You did not show the rest of the function.?

HTH
 
wait, there are cots i can crash in on the forum? o_O
 
wait, there are cots i can crash in on the forum? o_O
Well I might be on the forum a little more, as I am stuck in La in the USA at the moment and was planning on coming home next week.?
 
Well I would have hoped it would be no more than

Code:
Call DoRemote(m_oRecordset)

Public Function DoRemote(pRS as DAO.Recordset) ' or ADO if that is what you are using
Dim strCRD as String..... etc

With pRS
strCRD = NZ(.CRD)

Then just use your variables, or even the recordset fields direct if you can.?, You did not show the rest of the function.?

HTH

well I have a few hours spare this afternoon, i might even give that a go!

i could paste the rest of the function but it is really ugly...:)
 
Well I might be on the forum a little more, as I am stuck in La in the USA at the moment and was planning on coming home next week.?

That's not good. I wish you well and hope you get back here. and that you have a stock of toilet rolls.
 
No need, but you would still need to check for values, hence I use new variables, then just use those with the NZ() function, just a little copy and paste.
only now I have noticed that your first parameter being passed is CRD and there is not one in the function?, it starts with TE.?

I believe once you get this working it would save you a lot of time if you need to modify again, and simpler to maintain, which I believe is always a good thing. :D
 
Last edited:
Well I might be on the forum a little more, as I am stuck in La in the USA at the moment and was planning on coming home next week.?
La - Los Angeles or La - Louisianna? If the latter i hear @The_Doc_Man is a good cook with a spare room.
 
No need, but you would still need to check for values, hence I use new variables, then just use those with the NZ() function, just a little copy and paste.
only now I have noticed that your first parameter being passed is CRD and there is not one in the function?, it starts with TE.?

I believe once you get this working it would save you a lot of time if you need to modify again, and simpler to maintain, which I believe is always a good thing. :D

Hi Gasman, thanks. I have some success with this at the moment - well I have managed to create an email for myself with some of the fields in need it. (a bit chuffed really coz this isn't my thing! but pride comes before a fall...)

can i ask a couple of quickies?

I obviously have my SQL statement

Code:
sSQL = "SELECT dbo.shows.credit as CRD, dbo.promoters.treasureremail as TE, dbo.venues.paymentnotes AS paynotes, dbo.venues.paymentaccountnumber as PAN, dbo.venues.paymentsort as PS, dbo.venues.paymentname as PN, dbo.shows.[get out] as GO, dbo.shows.[get in] as GI, dbo.shows.[Running Time] as RT,_

do i have to do a "Dim strCRD As String" for each one of these?

and then do i have to do this for each?

Code:
With pRS
strCRD = nz(!CRD)
strTE = nz(!te)
strPaynotes = nz(!paynotes)
strPAN = nz(!PAN)
StrEventdate = nz(!EvDt)

at the moment this code works and produces an email when it gets to this code (and more of course):
Code:
strMessage = strMessage & "________________" & strCRD & "________" & vbCrLf & vbCrLf
 
strMessage = strMessage & strTE & vbCrLf & vbCrLf

strMessage = strMessage & "________________" & strPaynotes & "___" & strPAN & vbCrLf & vbCrLf
 
strMessage = strMessage & "________________" & StrEventdate & "___" & vbCrLf & vbCrLf

Call SendAttachments("ik test " & strCRD, strMessage, "ian@artsalive.co.uk")

Hope I formatted this correctly.

thanks for any help.

Ian
 
La - Los Angeles or La - Louisianna? If the latter i hear @The_Doc_Man is a good cook with a spare room.
La to me is Louisana, LA is Los Angeles. I'm in Keithville, Shreveport - Bossier City area.
However I have managed to get a flight out tonight . (y)
 
Hi Gasman, thanks. I have some success with this at the moment - well I have managed to create an email for myself with some of the fields in need it. (a bit chuffed really coz this isn't my thing! but pride comes before a fall...)

can i ask a couple of quickies?

I obviously have my SQL statement

Code:
sSQL = "SELECT dbo.shows.credit as CRD, dbo.promoters.treasureremail as TE, dbo.venues.paymentnotes AS paynotes, dbo.venues.paymentaccountnumber as PAN, dbo.venues.paymentsort as PS, dbo.venues.paymentname as PN, dbo.shows.[get out] as GO, dbo.shows.[get in] as GI, dbo.shows.[Running Time] as RT,_

do i have to do a "Dim strCRD As String" for each one of these?

and then do i have to do this for each?

Code:
With pRS
strCRD = nz(!CRD)
strTE = nz(!te)
strPaynotes = nz(!paynotes)
strPAN = nz(!PAN)
StrEventdate = nz(!EvDt)

at the moment this code works and produces an email when it gets to this code (and more of course):
Code:
strMessage = strMessage & "________________" & strCRD & "________" & vbCrLf & vbCrLf

strMessage = strMessage & strTE & vbCrLf & vbCrLf

strMessage = strMessage & "________________" & strPaynotes & "___" & strPAN & vbCrLf & vbCrLf

strMessage = strMessage & "________________" & StrEventdate & "___" & vbCrLf & vbCrLf

Call SendAttachments("ik test " & strCRD, strMessage, "ian@artsalive.co.uk")

Hope I formatted this correctly.

thanks for any help.

Ian
Well if you can use the fields directly like
Code:
strMessage & NZ(!CRD,"")

then I would do that.?
 

Users who are viewing this thread

Back
Top Bottom