rokerij
Technical User
- Feb 12, 2003
- 199
I am attempting to split a database that was created by another user. I have a created a database that contains Queries, Forms, reports, modules and macros and linked to tables on the server database. Then the database on the server with tables, modules and macros. the mods and macros are the same on both copies as i was not sure if where they were needed in this type of setup. So this is the "classic" front and back end, right? If not then maybe I have gone ary somewhere. Now when you open either the front or back ends, you get a Compile Error: User - Defined type not defined. Then the code opens with "Dim Currdb as Database" (No quotes). How do I go about defining this and where?
AS ALWAYS, THANK YOU THANK YOU THANK YOU for any and all help you may be able to lend me.
Here is a snapshot of the code:
Public Function Rollit()
'===========================================================
' Function Rollit()
' Mod. 8/31/00 KS
' Function is run at Autoexec. Checks the system date against
' the rollover date in the table UW21SystemScheduler.
' If the rollover target date is greater than 30 days, the
' appearance of the switchboard form remains the same, and
' rollover info appears in a text box only if the "info"
' button is clicked. If within 30 days, the text alert is
' posted, and the caption of the button changes so that
' rollover is initiated. Also true if deadline is overshot
' or the rollover date is within 5 days.
'===========================================================
'MsgBox "Hello from Rollit(). The date is " & Format(Now(), "long date")
Dim TargetDate As Date
Dim currdb As Database
Set currdb = CurrentDb
Dim domesday As Recordset
Set domesday = currdb.OpenRecordset("uw21SystemScheduler", dbOpenTable)
domesday.Index = "PrimaryKey"
domesday.MoveFirst 'Check the current year data
Debug.Print domesday![YearDesignation], domesday![CampaignYear]
Dim topyear As String, nowyear As String
topyear = domesday![CampaignYear]
nowyear = DatePart("YYYY", Now())
TargetDate = domesday![TargetRolloverDate]
Dim resp As Variant
Dim daysleft As Long 'daysleft is difference between Now and target rollover date
daysleft = (DateDiff("d", Now, TargetDate))
S.C. Albertin
Systems Coordinator/Newbie Tech
United Way
Help me to find my way, so that I may help others find theirs...
AS ALWAYS, THANK YOU THANK YOU THANK YOU for any and all help you may be able to lend me.
Here is a snapshot of the code:
Public Function Rollit()
'===========================================================
' Function Rollit()
' Mod. 8/31/00 KS
' Function is run at Autoexec. Checks the system date against
' the rollover date in the table UW21SystemScheduler.
' If the rollover target date is greater than 30 days, the
' appearance of the switchboard form remains the same, and
' rollover info appears in a text box only if the "info"
' button is clicked. If within 30 days, the text alert is
' posted, and the caption of the button changes so that
' rollover is initiated. Also true if deadline is overshot
' or the rollover date is within 5 days.
'===========================================================
'MsgBox "Hello from Rollit(). The date is " & Format(Now(), "long date")
Dim TargetDate As Date
Dim currdb As Database
Set currdb = CurrentDb
Dim domesday As Recordset
Set domesday = currdb.OpenRecordset("uw21SystemScheduler", dbOpenTable)
domesday.Index = "PrimaryKey"
domesday.MoveFirst 'Check the current year data
Debug.Print domesday![YearDesignation], domesday![CampaignYear]
Dim topyear As String, nowyear As String
topyear = domesday![CampaignYear]
nowyear = DatePart("YYYY", Now())
TargetDate = domesday![TargetRolloverDate]
Dim resp As Variant
Dim daysleft As Long 'daysleft is difference between Now and target rollover date
daysleft = (DateDiff("d", Now, TargetDate))
S.C. Albertin
Systems Coordinator/Newbie Tech
United Way
Help me to find my way, so that I may help others find theirs...