Date help...

AuroX7

Registered User.
Local time
Yesterday, 19:39
Joined
Feb 22, 2006
Messages
44
In Access, I'm trying to make it so whenever I type a date into the form, it will add it to the listbox in another form. However, I have two listboxes for January and February.

Something like...

If date_1 is between 01/01/06 and 31/01/06 Then add this to listboxJ in the other form

If date_1 is between 01/02/06 and 28/02/06 Then add this to listboxF in the other form

How would I do this? Thank you... I don't know if this is the right area to post. I apologise if it isn't. :)

Thanks guys.
 
Then add the item from date_1 into ListJ into other form...

Something like...

ListJ.AddItem (date_1.frmMain)

If somebody could correct that I would be deeply thankful. :D
 
You have to go through the Forms collection to reference another open form.
Forms!Form2Name!ListJ.AddItem = Me.date_1
using the real Form2Name of course.
 
Forms!frmMain!ListJ.AddItem = Me.BoI

Runtime error...says it can't find the form named 'frmMain'...

Eh? :confused:

Also, off topic a little...

Is it possible to open the main form immediately?

Like when I click on my database file, then go to 'Open', it opens the main form straight away instead of the menu. Is that possible at all? Thank you. :)
 
Last edited:
What is the name of the form on which ListJ is located? That's what belongs where frmMain is located in the reference.
 
ListJ is located on frmMain

My forms are:

frmBooking
frmHirer
frmMain
 

Users who are viewing this thread

Back
Top Bottom