Link to home
Start Free TrialLog in
Avatar of maximyshka

asked on

Passing Parameters


Would you please help me with the database.  I'm having errors in passing parameter

Form "frmLateCharges" has 2 Buttons which are not properly worked: Full Loan Charge and Footnote.
Issue is that both forms indicated below should open in the same loan reflecting in frmlatecharges.  

They used to be passed based on LoanNo field.  Which is the same as ACCTNO.  However, they need to be passed either by OO-Number or LoanNo

Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Make changes to your various "strLinkCriteria" lines. For example:

 stLinkCriteria = "[LoanNum]=" & Me![AcctNum]

The form you open must also have that field available, so make sure to review those forms to insure that you're calling a valid field.
Avatar of maximyshka


Would you please do change in thea attached example.  I was playing and could not figure out
Our role here is not to do the work for you but rather to assist you in figuring out how to do this. I'll be glad to help you work through it, but you'll need to do the work.
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you all for your help.

Thank you eghtebas for your help. It is working

Would you please be so kind to explain quotes.
Actual code is stLinkCriteria = "[OO-NUMBER]='" & Me![LoanNos] & "'"

Why do we enclose value from the table [OO-Number]  and actual passsing value in quotes

I understand  whole expression being put in quotes, plus value from the form also being put in single quotes.  I'm little bit lost with the data type string
When LoanNos = 1235     '<-- is numerical

 "[OO-NUMBER]=" & Me![LoanNos]

it translates to:  [OO-NUMBER]= 1235 when it is pluged in as filter parameter. But

when LoanNos = "1235"     '<-- is text, then

using "[OO-NUMBER]=" & Me![LoanNos]  still produces

 [OO-NUMBER]= 1235
text--^                 ^--number   thus the error.

Therefore, we need to surround 1235 with single quotes to acct as text (string).

"[OO-NUMBER]='" & Me![LoanNos] & "'"

produces   [OO-NUMBER]= '1235'
              string--^              ^--string


Thanks Mike. Apppreciate it