Correct systax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the following statement

Call AuditTrail(Me, client-id)

Whoever the VB editor is changing it to
Call AuditTrail(Me, client - id)

resulting in a missmatch
How do I keep the VB editor form inserting spaces before and after the -

Thanks
 
Perhaps this:

Call AuditTrail(Me, [client-id])


ACCESS assumes that you want to send the subroutine the result of
subtracting id variable from client variable otherwise.
 
client-id is my field name
I tried puttin in brackets, single and double quotes but nothing worked.
Any other ideas.
Naturally changing my table is not an option.

Thanks for your quick response.

Ken Snell (MVP) said:
Perhaps this:

Call AuditTrail(Me, [client-id])


ACCESS assumes that you want to send the subroutine the result of
subtracting id variable from client variable otherwise.

--

Ken Snell
<MS ACCESS MVP>



Eric Blitzer said:
I am trying to use the following statement

Call AuditTrail(Me, client-id)

Whoever the VB editor is changing it to
Call AuditTrail(Me, client - id)

resulting in a missmatch
How do I keep the VB editor form inserting spaces before and after the -

Thanks
 
You're saying that ACCESS still split apart the words from the hyphen when
you surrounded it with [ ] characters? I find this difficult to believe.

What are the data types of the two arguments in the AuditTrail subroutine?

--

Ken Snell
<MS ACCESS MVP>



Eric Blitzer said:
client-id is my field name
I tried puttin in brackets, single and double quotes but nothing worked.
Any other ideas.
Naturally changing my table is not an option.

Thanks for your quick response.

Ken Snell (MVP) said:
Perhaps this:

Call AuditTrail(Me, [client-id])


ACCESS assumes that you want to send the subroutine the result of
subtracting id variable from client variable otherwise.

--

Ken Snell
<MS ACCESS MVP>



Eric Blitzer said:
I am trying to use the following statement

Call AuditTrail(Me, client-id)

Whoever the VB editor is changing it to
Call AuditTrail(Me, client - id)

resulting in a missmatch
How do I keep the VB editor form inserting spaces before and after
the -

Thanks
 
create a function that returns the field name:

Call AuditTrail(Me, GetFieldName())


private function GetFieldName() as string
GetFieldName = "client-id"
end function
 
It does seem to work with the brackets.

thanks for you help.


Ken Snell (MVP) said:
You're saying that ACCESS still split apart the words from the hyphen when
you surrounded it with [ ] characters? I find this difficult to believe.

What are the data types of the two arguments in the AuditTrail subroutine?

--

Ken Snell
<MS ACCESS MVP>



Eric Blitzer said:
client-id is my field name
I tried puttin in brackets, single and double quotes but nothing worked.
Any other ideas.
Naturally changing my table is not an option.

Thanks for your quick response.

Ken Snell (MVP) said:
Perhaps this:

Call AuditTrail(Me, [client-id])


ACCESS assumes that you want to send the subroutine the result of
subtracting id variable from client variable otherwise.

--

Ken Snell
<MS ACCESS MVP>



I am trying to use the following statement

Call AuditTrail(Me, client-id)

Whoever the VB editor is changing it to
Call AuditTrail(Me, client - id)

resulting in a missmatch
How do I keep the VB editor form inserting spaces before and after
the -

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Audit trail seperate table??? 3
Auditing a subform 6
Form_~TMPCLP216211 1
transfer a field using button 1
AuditTrail() Error 4
Macro Variables 4
data type error 3464 - print record 2
Help with Code 1

Back
Top