B
Basil
Hi again,
I import a load of tables into a database and want to
record the date of update. I am happy to only record 1
date as all tables can only be imported at the same time.
Currently, I have a table ([Date of Update]) with 1 record
in it. When the last table is imported, this record is
updated to the system date.
The main switchboard form has a textbox (txtupddate) that
displays this date.
From this textbox, there are many functions set up in VBA,
eg start of the week date, start of the month date etc
(they were variables in VBA until recently when I made
them functions so that I could reference them within a
query). I take the assumption that the main switchboard
will always be loaded in the background.
Firstly, I do not think this is a very good method at all
and would really appreciate a better way of doing this
(Using something other than a table with 1
record?/referencing the table direct rather then the field
on the main switchboard?) - most probably a better way
that I haven't thought of.
Secondly, I wrote this code to update the main switchboard
txtupddate as soon as the tables are uploaded. It doesn't
seem to work - no errors, just doesn't do anything! Any
ideas why?:
Forms![Main Switchboard].SetFocus
DoCmd.Requery "txtupddate"
Forms![Update Tables].SetFocus
Thanks so much.
I import a load of tables into a database and want to
record the date of update. I am happy to only record 1
date as all tables can only be imported at the same time.
Currently, I have a table ([Date of Update]) with 1 record
in it. When the last table is imported, this record is
updated to the system date.
The main switchboard form has a textbox (txtupddate) that
displays this date.
From this textbox, there are many functions set up in VBA,
eg start of the week date, start of the month date etc
(they were variables in VBA until recently when I made
them functions so that I could reference them within a
query). I take the assumption that the main switchboard
will always be loaded in the background.
Firstly, I do not think this is a very good method at all
and would really appreciate a better way of doing this
(Using something other than a table with 1
record?/referencing the table direct rather then the field
on the main switchboard?) - most probably a better way
that I haven't thought of.
Secondly, I wrote this code to update the main switchboard
txtupddate as soon as the tables are uploaded. It doesn't
seem to work - no errors, just doesn't do anything! Any
ideas why?:
Forms![Main Switchboard].SetFocus
DoCmd.Requery "txtupddate"
Forms![Update Tables].SetFocus
Thanks so much.