473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Does Anyone understand this code?

1
I am new to this forum, i have created this database, however the timetables will not reset themselves. They have done previously, can anyone help?


Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. '------------------------------------------------------------
  5. ' Macro1
  6. '
  7. '------------------------------------------------------------
  8. Function Macro1()
  9. On Error GoTo Macro1_Err
  10. Dim db As DAO.Database, rstdatechange As Recordset
  11.  
  12. Set db = CurrentDb()
  13. Set rstdatechange = db.OpenRecordset("datechange")
  14.  
  15. On Error GoTo Macro1_Err
  16.  
  17.         If (rstdatechange![last updated] < Date) Or ((rstdatechange![last updated] = Date) And (Time >= rstdatechange![last time])) Then
  18.         DoCmd.RunMacro "Create History", , ""
  19.         DoCmd.RunMacro "Delete Timetables", ""
  20.         DoCmd.RunMacro "Recreate Timetables", , ""
  21.         DoCmd.OpenQuery "change update date", acNormal, acEdit
  22.         DoCmd.Close acQuery, "change update date"
  23.         End If
  24.  
  25.  
  26.  
  27. Macro1_Exit:
  28.     Exit Function
  29.  
  30. Macro1_Err:
  31.     MsgBox Error
  32.     Resume Macro1_Exit
  33.  
  34. End Function
Apr 28 '10 #1
0 869

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: lawrence | last post by:
I'm trying to read up on the rfc's that govern form inputs. Much of what I'm reading is stuff I didn't know before and some of it is alarming. This one left with me questions: ...
20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
8
by: lawrence | last post by:
I'm learning Javascript. I downloaded a script for study. Please tell me how the variable "loop" can have scope in the first function when it is altered in the second function? It is not defined...
12
by: Oliver Knoll | last post by:
Ok, I've searched this group for Big/Little endian issues, don't kill me, I know endianess issues have been discussed a 1000 times. But my question is a bit different: I've seen the follwing...
4
by: Garry Freemyer | last post by:
I'm trying to convert this macro to a c# function but I have a big problem. It's on the LEFT side of an assignment statement and I am extremely flustered over this one because I'm a little rusty...
8
by: mastermagrath | last post by:
Hi, I'm about half way through Bruce Eckels thinking in C++ Vol 1. He gives a very short example of how compiler function name decoration helps remove subtle bugs by type-safe linkage. However,...
52
by: Julie | last post by:
I'm supporting an application at work. Below are some code segments that I can't understand how they work. First let me say, I would never code this standard. I'm just really creeped out that it...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.