Hi Guys
I've noticed that In some situations code work and then in other the same doesnt work. For example:
In my PaymntsF form I have this:
Private Sub InvoiceID_AfterUpdate()
Dim TmpCustID As Integer
TmpCustID = Me!InvoiceID.Column(1)
Me!txtCustomerID = TmpCustID
End Sub
Here it works fine. I am using the InvoiceID from the previous form to give a textbox on the current form a value. Then this value is saved to the table. The textbox txtCustomerID is bound to CustomerID in the table PaymentsT.
Then If I do the same thing in a different form I get an error that I cannot assign a value to this object.
Private Sub Form_Open(Cancel As Integer)
Dim TmpInv As Integer
Dim TmpCust As Integer
TmpInv = Forms!InvoiceDataEntryF!InvoiceID
TmpCust = Forms!InvoiceDataEntryF!CustomerID
Me.txtInvoiceID = TmpInv
Me.txtCustomerID = TmpCust
End Sub
On second code the textboxes both populate with the values but it wont save it to the source fields on the table
Does anyone now why Access does this?
I want to save the two text boxes value to the 2 fields on the table.