Correct systax

E

Eric Blitzer

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
 
K

Ken Snell \(MVP\)

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.
 
E

Eric Blitzer

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
 
K

Ken Snell \(MVP\)

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
 
K

knightconsulting

create a function that returns the field name:

Call AuditTrail(Me, GetFieldName())


private function GetFieldName() as string
GetFieldName = "client-id"
end function
 
E

Eric Blitzer

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
 
Top