Report throwing runtime error 2100

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 02:23
Joined
Nov 8, 2005
Messages
3,309
Hi guys - long time no speak

i have a report that that i need to be a bit dynamic
If quoteslip = q basically the report does nothing other than how i have already set it up
however if quoteslip w then do stuff

"w" does what i want however "q" doesn't
I have tired we me. etc


the information is in a qry and into the report
so
Hello Baby (w) will start in one location (left/top ) 567
hello Baby (q) should start in another (left3567 and top170)

its not doing what it should and i am sure i have missing something simples


If Me.QuoteSlip = "w" Then

substance.Left = 567
substance.Top = 567
substance.Width = 9735
End If

If Me.QuoteSlip = "Q" Then
Me.substance.Left = 3567
Me.substance.Top = 170
Me.substance.Width = 6205

End If
 
when you get a OBJECT error: Application-defined or object-defined error
that means an object on the form is not found or used wrong.
you only have 2: QuoteSlip and Substance

if you put a ME. in front (like you did for Q) then it should autofill with
the name, otherwise the object is missing. (out of scope maybe)

so Q is using the ME, so ....

Code:
select case  Me.QuoteSlip 
     case "w"

    substance.Left = 567
    substance.Top = 567
    substance.Width = 9735

      case  "Q" 
    Me.substance.Left = 3567
    Me.substance.Top = 170
    Me.substance.Width = 6205
End select
 
ok - I tried this and nope
same problem
 
Where is your code - needs to be in the format event of whatever section your substance control is in.

also have you got option explicit at the top of each module (you should have) and if so do you get an error when you compile ?
 
my code wasnt the solution, it was just what to look for.
 

Users who are viewing this thread

Back
Top Bottom