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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 program Unable to update Order Entry unit price field

Status
Not open for further replies.

proxy00

MIS
Jul 16, 2004
7
CA
Hi All, I am using VB6 to import order entry from SQL to Accpac pervasive. Other fields come in ok, say, item number, qty. Only, unit price, I cannot make it to come in from SQL.
I have tried all kinds of data type for the field, CStr, CDec, CDbl, none of them worked.
Sample line of code:
OEORD1detail1Fields.FieldByName("UNIPRICE").Value = "15.11"

Can anyone please help? help is much appreciated!
 
What error do you get?
The field name is UNITPRICE by the way.
 
Thanks, sorry about the typo.
I didn't get any error message. It just didn't come in...
 
I added a line for testing after assigning the value
msbox OEORD1detail1Fields.FieldByName("UNITPRICE").value and it gives right value.
But after run the program, it still only pulls the default price from item pricing set up, not overwritten by the value I tried to assign it to.
 
ettienne, thank you very much!
I found the problem after record a macro.
I should use "PRIUNTPRC" instead of "UNITPRICE".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top