General information
Category:
Coding, syntax & commands
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only