John,
Record Source of form "Add New Member" is Table "Members" in this table i today added field "LastUpdate".
None of the subforms have field LastUpdate yet on the TabCtl. Each subforms Record Source is separate table.
As these all subforms have Default View--->Datasheet, will i have to create field "LastUpdate" for each subform and put it on its Detail Section and then for each forms Before Update Event put similar code as for Main form "Add New Member".
Am i right ?
Regards,
Khalid
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Khalid-
What is the Record Source of this form and the Record Source of each of the subforms on the tab control? Which tables have a LastUpdate field? If there are separate tables, you would need similar code for each of the forms in the subform controls.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 3, 2017, at 7:13 PM, Khalid Tanweer khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hi John,
Hope you would be fine and all others in the Group.
I have a form "Add New Member" Default View--> Single Form.
I have put a new Text Control on its Footer "LastUpdate" Format Short Date. Visible=Yes
Forms Before Update Event is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim msg As String
msg = msg & "Do you want to Save this record?"
If MsgBox(msg, vbYesNo, "SAC Pakistan Guide - Confirmation!") = vbYes Then
DoCmd.Save
If Me.MembershipExpireDate < Now Then
Me.SocietyLeavingReason = "Dormant"
Me.SocietyLeavingDate = MembershipExpireDate
Me.Working = False
LabelWorking.BackColor = RGB(255, 0, 0)
LabelWorking.Caption = "Removed Member:"
Me.LastUpdate = Now
End If
If IsNull(MembershipExpireDate) Or MembershipExpireDate > Now Then
Me.SocietyLeavingReason = ""
Me.SocietyLeavingDate = ""
Working = True
LabelWorking.BackColor = RGB(0, 9900, 0)
LabelWorking.Caption = "Active Member:"
Me.LastUpdate = Now
End If
Else
Me.Undo
End If
End Sub
Dim msg As String
msg = msg & "Do you want to Save this record?"
If MsgBox(msg, vbYesNo, "SAC Pakistan Guide - Confirmation!") = vbYes Then
DoCmd.Save
If Me.MembershipExpireDate < Now Then
Me.SocietyLeavingReason = "Dormant"
Me.SocietyLeavingDate = MembershipExpireDate
Me.Working = False
LabelWorking.BackColor = RGB(255, 0, 0)
LabelWorking.Caption = "Removed Member:"
Me.LastUpdate = Now
End If
If IsNull(MembershipExpireDate) Or MembershipExpireDate > Now Then
Me.SocietyLeavingReason = ""
Me.SocietyLeavingDate = ""
Working = True
LabelWorking.BackColor = RGB(0, 9900, 0)
LabelWorking.Caption = "Active Member:"
Me.LastUpdate = Now
End If
Else
Me.Undo
End If
End Sub
--------------------------------------
Up to here it is OK.
The form has a TabCtl "TabCtlMemberInfo" it has 7 Tabs and under each Tab there are separate forms with Default View-->Datasheet
Now the situation is that before me some one other entered data and now i am myself looking and updating the data. As information regarding members might have changed or previously entered wrong or some fields have missing entries. Therefore i have to call and contact each member one by one and get it confirm from member his information under each Tab/Form.
I need as on Main Form on Save i am updating "LastUpdate". These Forms should also in any way be shown "Last Updated".
How ? i am not getting the logic or design. Please help.
Regards,
Khalid
__._,_.___
Posted by: khalidtanweerburrah@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar