Reserved error (-3025); there is no message for this error.

snipered

Registered User.
Local time
Today, 15:01
Joined
Jan 19, 2005
Messages
15
Hi, i keep getting the error displayed in the title.

I ma doing a pretty simple query. Just finding a value in one table and inserting it into another.

Does someone know why access does not like it please?

INSERT INTO tblExtend (extendContractID, extendMonths ) VALUES ( (SELECT conID FROM tblContract WHERE conMobileNumber = '5454545'), 12 )
 
Dont think you can do this this way in Access... Try...

INSERT INTO tblExtend (extendContractID, extendMonths )
SELECT conID, 12 FROM tblContract WHERE conMobileNumber = '5454545'

Also a number = '' ??? or is your number field actually a text??
If its a number field you need to lose the '' as well.
 
Hi,

Thanks for the reply. That worked nicely.

Just for the info:
It is a textfield. the reason being a number field for mobile number is too large for the field in access.
 
Not true... a double can contain just about any number...
 
Also you may need to trap Null values in your select section. I would wrap this with the Nz() function just in case. Forever pessamistic.

David
 
I'm going to be honest...it didn't cross my mind to use double.

However, it does miss out the 0 at the start.

DCrake, i wasn't aware of the access formula Nz().
Thanks for that.
 
Yes leading zero's are lost... Phone numbers generaly are text because of that very reason...
 

Users who are viewing this thread

Back
Top Bottom