Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[94] Invalid use of Null - when opening calendar form

Status
Not open for further replies.

barry2004

Technical User
Oct 13, 2004
42
GB
Hi guys, I have a datasheet form called "frm_bookings" which has 2 Date fields called "Date In" and "Date Out". Each of these fields has a On_Double Click event which then Opens a calendar form called "frm_calendar", this works just fine.
Here's the problem, if "frm_bookings" is used as a subform on a form called "frm_bookings1" and I try to use the double click feature to open up the calendar form, it does not come up. Instead I get the following: "[94] invalid use of Null"
Any clues??
 
How are ya barry2004 . . .

Post the code in the [blue]DoubleClick[/blue] event! . . .

Calvin.gif
See Ya! . . . . . .
 
Hello it's:

Private Sub Signed_In_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmCalendar"
End Sub

frm_calendar is a freeware calendar form which you find around on the internet...
 
barry2004 . . .

Its a chart of how to properly reference forms & subforms. Your interest is in the [blue]To refer to a control[/blue] section.

From left to right the 1st column shows where the control is. Lets say its [blue]on sub1[/blue].

The middle column shows the proper code referencing if the code were running from the mainform:
[blue]Me!Subform1.Form!ControlName[/blue]

The right column shows the proper code referencing if the code were running from sub1:
[blue]Me!ControlName[/blue]

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Hi!
I am not very good at programming and I am trying to build a database with Access. I have exactly the same problem with the calendar. I understand that I have to change the control referencing but I don't know how. Do you change the code,

"Private Sub Signed_In_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmCalendar"
End Sub"

somehow, or what? Can you give a simple example?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top