Invalid procedure call!?

M

Mattias

Hi

Based on two textfields in the same table I would like to move part of the
data from MÃ¥tt1 to the emty field MÃ¥tt2:

UPDATE MASTER SET MÃ¥tt2 = Mid("MÃ¥tt1",InStr(1,"MÃ¥tt1"," ")+1), MÃ¥tt1 =
Left("MÃ¥tt1",InStr(1,"MÃ¥tt1","x")-1);

But i get errormessage "invalid procedure call when running it.

Mattias
 
D

Duane Hookom

You should remove the quotes from around your field names. Use quotes around
your "static" string/text values like "x:".
 
M

Mattias

Hello Duane

Thank you for your reply, and sorry for my late reply.

The update query worked now, but on the other hand I noticed the result was
not 100% correct, I guess was because I copied the base syntax from another
case I used it in.

In the text field MÃ¥tt1 I have data that looks like this: 100x16, 24,5x33,6
I want to keep all on the left side of the x in MÃ¥tt1, remove the x from
MÃ¥tt1 and
move everything on the right side of the x to field MÃ¥tt2

And another exampel I have in MÃ¥tt1: H: 200
Here I would like to remove "H:" and keep 200

Mattias
 
D

Duane Hookom

Go into any module and lookup Help on string functions like Instr(), Left(),
Right(), and Mid(). If you understand these functions, you will know as much
as I do about solving your issue.
 
M

Mattias

Hi

I have read about it now, but I have a problem with the position of the "x"!!
it varies, somtimes it has position 4 and someimes position 6 etc.

Mattias
 
D

Duane Hookom

One of the functions that I mentioned suggests how to find out the position
of a string within a string.
 

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

Top