Hi,
I'm a beginner with access and thanks to help from this forum and other sources on the internet i was able to develop a program for my company that tracks current tasks and displays them on a weekly basis.
For this I've created a a new record for every week and have coded it so that everytime the form loads, it checks if the current week is the same as on the form, if not it creates a new form with the current week.
The code is as follows:
Private Sub Form_Load()
DoCmd.RunCommand acCmdRecordsGoToLast
If Text212.Value <> Format(VBA.Date, "ww", vbSunday, vbFirstFourDays) And IsNull(Text212) = False Then Command228.SetFocus
SendKeys "{Enter}"
End Sub
This was working perfectly fine till about last week when Access started creating new records at the beginning rather than the end. So when the command DoCmd.RunCommand acCmdRecordsGoToLast runs, the system doesn't realise that the new record is created at the beginning and creates another duplicate record (again at the beginning) and the whole thing repeats everytime the form loads. In the Image below you can see 1817 doe weeks 17 of the year 2018 is created at the top instead of the bottom as it was doing before.
Is there any reason why this error is randomly showing in a system that was working fine all this while. Also can you help me fix the issue.
Thanks a Ton