Re: Help - Can't understand Code
- From: "TC" <aatcbbtccctc@xxxxxxxxx>
- Date: 28 Mar 2006 22:27:19 -0800
Angeline wrote:
TC,
Wow, thanks so much for the compliment - I needed it.
No probs. It's amazing how little information many questions include! I
thought that yours got the balance just right.
OK
1) I have the sample database in its orignial form. The form does work
Ok, that's a good start.
however if I actually try and run the query which the subform is bound to by
itself, I do get an error which sais: Microsoft Access can't find the form
'frmMultiselectListDemo' referred to in a macro expression or VB code.
That's ok, because the query is using things from the form. If the form
isn't open, the query will fail. *Personally*, I dislike that way of
writing a query. I personally do not believe that a query should be
tightly bound to a form, like that. But lots of people do it like that.
2) The subform doesn't have a SELECT statement however the query it is bound to does.
Ok, got it.
You mentioned I had to change the parameter values. I had actually
already done this. At first I hadn't and when I tried to test the form it
came up with an error. I then got wiser to it and changed the parameter names
to suit but the result upon testing was no error, however no results
displayed in the subform.
I can't quite get my head around their function. Fo some reason, I'm
not quite on the ball at the moment! So here's what I'd do, to move
forward. Temporarily change the query to this:
SELECT TblComp.*
FROM TblComp
Now the subform should display all the records, regardless of what you
select in the listbox. If it *doesn't*, then, the problem is somewhere
other-than in the IsSelectedVar() function. But if it *does* display
all the records, then, there's something wrong with that function, or
the way the query has called it.
Sorry I can't be more specific. I'm sure it's quite simple, but I can't
quite get my head around it!
HTH,
TC (MVP Access)
http://tc2.atspace.com
.
- Follow-Ups:
- Re: Help - Can't understand Code
- From: Angeline
- Re: Help - Can't understand Code
- References:
- Re: Help - Can't understand Code
- From: TC
- Re: Help - Can't understand Code
- From: Angeline
- Re: Help - Can't understand Code
- Prev by Date: Re: Filter in my form
- Next by Date: Re: Best Practices for Handling A Large Matrix of fields
- Previous by thread: Re: Help - Can't understand Code
- Next by thread: Re: Help - Can't understand Code
- Index(es):
Relevant Pages
|