Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigned values not accepted.

Status
Not open for further replies.

Bluejay07

Programmer
Mar 9, 2007
780
CA
Hello,

This is a partial post from my initial Accpac Solutions Forums post.

I am having a problem assigning a value and I think it is related to the VB6 environment.

If I am using the following code
.Fields("DSALEPRICE").Value = "5", the result is:
.Fields("DSALEPRICE").Value = 0.

Zero is the default value.

Any suggestions why the assigned value is not being accepted.

I am encountering this for three different fields, the other two fields are dates.

I have also used similar code in the past with out any problems.

Thanks in advance.
 
Hi ivant34,

Thank you for your reply.

The 5 is in quotations because the field is a string type. The actual value will most likely be something similar to "5.00
 
It looks like you're working with a recordset. Are you "updating" after you set the value?

Code:
.Update

Chewdoggie

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
I've done some programming of AccPac from VB6. It's not a VB6 problem. I looked at your post on the AccPac forum. Your code looks suspiciously less verbose than I am used to seeing with AccPac.

I assume your initial code base came from the macro recorder. I would go back to that, then start trimming the code a few lines at a time, testing each small change. When your code stops working, put back whatever line you took out previously. It's a painstaking process.

You are better off sticking to the AccPac forums. Those guys know their stuff, and AccPac programming is kind of an arcane art.

Joe Schwarz
Custom Software Developer
 
ChewDoggie,
Thanks for the post. I am not working with a recordset. I am working with Accpac Views with access the tables directly. A slightly different process. My values are being set before the update is executed.

JoeAtWork:
You are correct. My code originated from a macro. I will re-examine it and check things out line by line.

I think the problem is with a combination of both VB6 and Accpac code. I have just received approval to obtain support from Accpac. Maybe they might have a different process for me to try.

Thank you for your responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top