Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unruly Control
Message
From
01/05/1997 10:55:14
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00030343
Message ID:
00030455
Views:
39
>>You're going to think I am crazy, but:
>>
>>I have a control on a form bound to a field in a table. The user selects a customer name and I put in the customer primary key into this invisible control's value property. When I save, all of the controls bound to this table save properly EXCEPT the CustPKey--I get nothing. I checked its Value just before saving (txtCustPKey.Value)--it's correct. I save--get nada in that one field only. I have checked every property and value I can think of. What would prevent a bound control from writing to the field in the table??? ARGH!!@!
>>
>>TIA.
>>
>>John
>
>check controlsource. also make sure you're not setting that value before you create the new record (if using buffering) -- otherwise it'll go to the previously active record

David:

This thing is driving me CRAZY. Here's the whole deal: I am trying to
create an invoice--simple enough, right? I generate an invoice #, the
user inputs (or selects) the date, salesperson, customer name. I have a
text control, txtCustPKey, that is marked .Visible = .F. As soon as the
user selects the customer name, I grab the Customer Primary Key:
THISFORM.txtCustPKey.Value = Customer.CustPKey. When I save, I get the
invoice #, date, and salesperson, but I get nothing for the CustPKey.
One line before before the TABLEUPDATE, I check the following:

WAIT WINDOW "CustPKey:" + STR(THISFORM.txtCustPKey.Value) + " " +
THISFORM.txtCustPKey.ControlSource.

I get the following result:

CustPKey: 3 InvHead.CustPKey

One line after the TABLEUPDATE, I ask the following:

WAIT WINDOW STR(InvHead.InvNo) + STR(InvHead.CustPKey) +
STR(THISFORM.txtCustPKey.Value)

I get the correct invoice #, a zero, and the correct customer #. I am
beginning to lose the big picture down here. I have deleted the control and added it back in. Nothing works. It's gonna drive me to drink. Any other thing for me to check???

Thank you, as always, for kicking in.

John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform