Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

Date Type Mismatch

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JB - 23 Mar 2007 10:22 GMT
I have a main form with a subform. The subform also contains a
subform. On the main form is a text box that contains the following
code in the data source of the PrintCount field:
=(DCount("PrintID","tblPrint","FilmNumber =" & FilmID])

In the primary subform's Form_Current event, I refer to the value of
this field on the mainform using this code:
       If Forms!AA_frmFilms!PrintCount > 1 Then

When the forms originally load, the code executes and the PrintCount
reference on the subform works as expected. If I then click on a
button on this subform to save the edited contents of the subform
record, the code executes again and I get a Error 13 Type Mismatch
error. I have tried a variety of techniques including different
reference methods and even converting the original value of PrintCount
to an Integer. Nothing works. If I do not have a break set at this
line, the application completely crashes and Access shuts down.

Does anyone have a suggestion?
Stefan Hoffmann - 23 Mar 2007 10:51 GMT
hi JB,

> In the primary subform's Form_Current event, I refer to the value of
> this field on the mainform using this code:
>         If Forms!AA_frmFilms!PrintCount > 1 Then
I normally use

  Forms("AA_frmFilms").Form.PrintCount.Value

But as it is a subform, you may try

  Parent.Form.PrintCount.Value

> If I do not have a break set at this
> line, the application completely crashes and Access shuts down.
This sounds odd. Have you already run repair and compare on your database?

mfG
--> stefan <--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.