RE: Run-time Error 2186

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I should also point out that there are other buttons that also reference the
DateFrom and DateTo fields on the form that work well and do not create these
2467 or 2186 errors.


"Alberto" wrote:

Everytime I open up change a form from the "Design" to the "View" format, I
get the following error:
Run-time Error: 2186
This property isn't available in Design view

I believe the error stems from the fact that the form has several buttons on
it that open queries that reference a two date parameter fields and
manufacturer parameter fields that filter the query when it is run. I know
this because when I take those buttons off of the form, the error disappears.

When I obtain the "Run-time Error 2186" and hit debug, the following is
highlighted:

Public Function FromDate() As Date
' Get FROM date from DatePicker
FromDate = FormatDateTime(Form_StartForm.DateFrom.Value, 2)
End Function

or

Public Function Manufacturer() As String
If Not Form_StartForm.ManufacturersID.Value Then
Manufacturer = Form_StartForm.ManufacturersID.Value
End If
End Function


Also, sometimes the run-time error appears as a 2467 error. THis occurs the
first time that I open the form.

I am fairly green with MSFT Access so I don't even know where to begin.
What should I do to solve this?




.



Relevant Pages

  • Re: Run-time Error 2186
    ... I believe the error stems from the fact that the form has several buttons on it that open queries that reference a two date parameter fields and manufacturer parameter fields that filter the query when it is run. ... When I obtain the "Run-time Error 2186" and hit debug, ... Public Function FromDate() As Date ... Public Function Manufacturer() As String ...
    (microsoft.public.access.forms)
  • Re: Run-time Error 2186
    ... if you are in the code behind your form, you can use this reference form: ... I believe the error stems from the fact that the form has several buttons on it that open queries that reference a two date parameter fields and manufacturer parameter fields that filter the query when it is run. ... When I obtain the "Run-time Error 2186" and hit debug, ... Public Function Manufacturer() As String ...
    (microsoft.public.access.forms)
  • Re: Run-time Error 2186
    ... When I obtain the "Run-time Error 2186" and hit debug, ... Public Function FromDate() As Date ... Public Function Manufacturer() As String ...
    (microsoft.public.access.forms)
  • Run-time Error 2186
    ... When I obtain the "Run-time Error 2186" and hit debug, ... Public Function FromDate() As Date ... Public Function Manufacturer() As String ...
    (microsoft.public.access.forms)
  • Re: Writing Access functions
    ... passing values by Value or by Reference. ... Public Function NameFromIDAs String ... If you pass a control reference: ...
    (microsoft.public.access.modulesdaovba)