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

Two forms, same table, common field, does not operate the same

Status
Not open for further replies.

mesafloyd

Technical User
Aug 19, 2006
31
US
Hi,
I have a table: tblPropertyList
I have two forms: frmAllFields frmUpdates
Each form has a Text Box that is 'control sourced' by the same field... INTERNALCOMMENTS.

The text box is a free text field used for makeing notes on a particular record... I have this code in both form's VBE code(Kindly given by CautionMP)...

Private Sub Form_BeforeUpdate(Cancel As Integer)
INTERNALCOMMENTS = Format$(Date, "Short Date") + " " + INTERNALCOMMENTS
End Sub

This is intended to insert todays date and a space preceeding any data entry so the user knows whan a preveiouse note is entered... the INTERNALCOMMENTS Fild is suppose to stay updated regardless if the entry is made from either form.

In the frmUpdates it works fine.. the date does enter properly upon exiting the text box... no matter where you go, ie, <CR> or click to another field, or go to another record(and return)

Here's the problem: In the frmAllFields the date does not appear unless I go to another record and then return.... it does not update with a <cr> or clicking on another field... I have to exit that record and return...
It appears I must go to another record and return, I does not update if I simple go to the other form and return.

I have tried everything in my feeble ability. I have removed all the code except the above, thinking something was effecting it, any suggestions?

Am I clear..?? I am not a programer but I do take directions well... thanks in advance.
 
In the AfterUpdate event procedure of the TextBox:
Me.Dirty = False

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV, thanks for the respone.

Don't want to show my 'lameness' but I don't have a 'AfterUpdate' event procedure of this textbox... only the above code...

Im not real good at this...

I don't have an AfterUdate procedure in the frmUpdates either and that one works.

am I doing something wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top