Re: Calendar Form
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxx>
- Date: Sat, 24 Jan 2009 07:46:43 -0500
What you've done sounds sufficient.
When you first open the form, what appears on it? If there's nothing in
CompanyName, then the form should be empty. If not, something's wrong with
your query. Post its SQL.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Melissa" <melissafleetwood@xxxxxxxxx> wrote in message
news:OY6NoxWfJHA.2180@xxxxxxxxxxxxxxxxxxxxxxx
Thank you for the reply
I put the record source of the form to "qryCalendar", which I have the
field "CompanyName", and then in the criteria, i added
Forms![frmCalendar]![CompanyName]
Also - after update for combo - Me.Requery
It still shows all the records for all the companies? did I perhaps do it
incorrectly? should more fields be added to the calendar query?
Thank you
Melissa
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxx> wrote in message
news:%23gYZywMfJHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
Base the form on a query. As a criteria in the query (under the
CompanyName field), put a reference to the combo box:
Forms![NameOfForm]![NameOfCompany].
In the AfterUpdate event of the combo box, put code to requery the form:
Me.Requery
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Melissa" <melissafleetwood@xxxxxxxxx> wrote in message
news:%23EPY%232LfJHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
I'm using Access 2002...
That did the trick, thank you.
My Calendar form opens, and I can add information into it, as well as
print the various reports.
Is there perhaps a way that I can insert a combo box on my calendar form
for "CompanyName", in which I can select a company from the list, and
then add/view information on the calendar for that specific company?
Eg. I select "ABC Trading", and then add some text in the block for
January 15th, then I select a differenct company "SEL Importers" from
the list, and the text i inserted on January 15th for ABC traders will
no longer appear....and I can add records for SEL Importers?
Thank you kindly for your assistance
Melissa
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxx> wrote in message
news:%23FubnyIfJHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
Go into the Refererences dialog (If you're using Access 2003 or
earlier, it'll be under the Tools menu when you're in the VB Editor,
afraid I can't remember where on the ribbon it is if you're using
Access 2007, but you need to be in the VB Editor there too)
Assuming you're using an MDB, you need to find the reference for
Microsoft DAO 3.6 Object Library and select it. If you're using an
ACCDB, you need to find the reference for Microsoft Office 12.0 Access
database engine and select it.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Melissa" <aog.jhb@xxxxxxxxxx> wrote in message
news:ufXXA5FfJHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
Hi
Error: Compile Error....User defined type not defined.
(Dim db As DAO.Database) is also highlighted, each time I close and
go back in it highlites a different line.
What is the DAO library?
Thank you
Melissa
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxx> wrote in
message news:e3zInF8eJHA.5316@xxxxxxxxxxxxxxxxxxxxxxx
What error do you get?
The fact that the previous line (Dim db As DAO.Database) doesn't
cause problems implies that the DAO library is properly referenced.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Melissa" <aog.jhb@xxxxxxxxxx> wrote in message
news:eykWnc5eJHA.5572@xxxxxxxxxxxxxxxxxxxxxxx
Boyd
Thank you very much for your reply
I have imported the module as well, and when i open the calendar
form, it gives me the "debug" option:
Public Sub PutInData()
Dim sql As String
Dim f As Form
Dim db As DAO.Database
**Dim rs As DAO.Recordset
Dim i As Integer
Dim myDate As Date
(When - debug, line with stars next to it is highlited in yellow?)
Thank you
Melissa
"Boyd Trimmell aka HiTechCoach via AccessMonster.com" <u14500@uwe>
wrote in message news:9080279a995de@xxxxxx
Melissa wrote:
Hi
I am creating a database for a security company.
I have a form for "Company" 's , "Employees" , and "Contracts
On my Company Form, I have a subform for the contract, which works
fine
My Employees form is just where you add employee info, this is also
ok.
Now what I would like to do, is create a form with a large calendar
on it,
and there must be a combo box perhaps on the top of the form to
select which
Company the calendar belongs to. Then, after selecting a company
from the
combo box, the user can double click on a day in a specific month
which then
brings up an input box to type in the names of the security gaurds
(employees) who are working, or who have worked at that company's
premises
on that specific day.
I would also like to be able to print this calendar form to see
exaclty who
worked on which days. Would this report perhaps also be able to
give a
total number of shifts worked per gaurd (employee)?
I found a database example on the internet of a similar "Calendar
form"
which works great, However I cannot import the form and table into
my
database - it wont work. The code for this form is also much more
advanced
than my knowledge, so Im not sure exactly how to get it to work in
my
database?
Please could someone assist me?
Thank you kindly
Melissa
Did you check to see if there were any code "modules" that you
also need to
import? If there are any in the sample database, try importing
those also.
This may get the example to work in your database.
Hope this helps ....
--
Boyd Trimmell
aka HiTechCoach
http://www.hitechcoach.com
http://www.officeprogramming.com
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200901/1
.
- Follow-Ups:
- Re: Calendar Form
- From: Melissa
- Re: Calendar Form
- References:
- Calendar Form
- From: Melissa
- Re: Calendar Form
- From: Boyd Trimmell aka HiTechCoach via AccessMonster.com
- Re: Calendar Form
- From: Melissa
- Re: Calendar Form
- From: Douglas J. Steele
- Re: Calendar Form
- From: Melissa
- Re: Calendar Form
- From: Douglas J. Steele
- Re: Calendar Form
- From: Melissa
- Re: Calendar Form
- From: Douglas J. Steele
- Re: Calendar Form
- From: Melissa
- Calendar Form
- Prev by Date: Toggle button
- Next by Date: RE: Toggle button
- Previous by thread: Re: Calendar Form
- Next by thread: Re: Calendar Form
- Index(es):