on 09-22-2008 11:13 AM
Hi,
On the quotations form there is a tax date field.
I have renamed the caption "last updated" and wish everytime the form loads for the data to read the same as the server date as below:
'Move "Document Date" Caption and rename "Last Updated"
oXPlaneItem = oForm.Items.Item("85")
oYPlaneItem = oForm.Items.Item("13")
oItem = oForm.Items.Item("86")
With oItem
.Height = oYPlaneItem.Height
.Width = oYPlaneItem.Width
.Left = oYPlaneItem.Left
.Top = oXPlaneItem.Top
End With
oLabel = oItem.Specific
oLabel.Caption = "Last Updated"
'Move "Predicted Closing Date" edit box to centre
oXPlaneItem = oForm.Items.Item("13")
oItem = oForm.Items.Item("12")
With oItem
.Left = oXPlaneItem.Left + oXPlaneItem.Width
.Top = oXPlaneItem.Top
End With
'Move "Document Date" EditBox Always equal server date
oXPlaneItem = oForm.Items.Item("85")
oYPlaneItem = oForm.Items.Item("12")
oItem = oForm.Items.Item("46")
With oItem
.Height = oYPlaneItem.Height
.Width = oYPlaneItem.Width
.Left = oYPlaneItem.Left
.Top = oXPlaneItem.Top
End With
oEdit = oItem.Specific
oEdit.String = oApp.Company.ServerDate
This works for User defined edit boxes if the databind is definded.
Is it possible to acheive what I am trying to do? At present the dit box constaly reads what is in the table and does update to the server date.
David,
your code seems to be ok, the question is, in which event you execute this code.
But, you can do this easier - the label you may rename with ctrl+dbl click on it and the date of last changes you may find from changes protocol for the current sales quotation and show it to the form with formatted search as select from protocol where date is max from existing dates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right I've got the problem wrong....
Its nothing to do with user defined fields.....
When the entry is first added it allows the server date string to populate in the edit box, but if an entry is to be updated, when the form loads the edit box does not populate with the new date.
The only other "naff" way of doing it is to do an sql query to update the table entry but then the field may become "Last Viewed" as opposed to "Last updated"
Any Ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think it where the data comes from that is the problem, it is as someone mention before the event in which I perform the data equality.
What I am trying to do now is recognise the formmode and "update button" click then perform an sql query to update the table itself as SDK is becoming more limited everyday.
I take it no one has tried something like this yet?
Hi,
Thanks for your reply.
I'm performing this on form load at present, so that if any chages are made they are with the Last Updated field already populated. The trouble is that once data is in there I cannot adjust it uing sdk code. I have deleting and adding etc etc. It just seems to be because it is an editbox already on the form and not a user defined editbox.
Dave.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.