PC Review


Reply
Thread Tools Rate Thread

subform control data source query not working

 
 
Mark Kubicki
Guest
Posts: n/a
 
      17th Aug 2009
on my main form [frmSpec] I have a combo control [cboManufacturer], and a
subform [fsubManufacturerAlternates]

On that subform [fsubManufacturerAlternates] is the combo control
[cboManufacturerAlt] whose data source is written as

SELECT Manufacturers.ManufacturerName
FROM Manufacturers
WHERE
(((Manufacturers.ManufacturerName)<>[Forms]![frmSpec]![cboManufacturer]))
ORDER BY Manufacturers.ManufacturerName;

however, it is not finding <>[Forms]![frmSpec]![cboManufacturer]

where should I be looking for this error?

I've checked the spelling,
and
the field Manufacturers.ManufacturerName , as well as it's source
Manufacturers are correct
and
when I type into the "parameter not found" prompt the value of
cboManufacturer, the query presents properly...

thanks in advance,
Mark


 
Reply With Quote
 
 
 
 
roger
Guest
Posts: n/a
 
      17th Aug 2009
Its timing. there is no value in the control at the time the form opens.
you could do a number of things:

1: unbind the subform and use the mainform's oncurrent event to update the
subform.
or
2: store the value (from the main form) somplace else. another form, a
memory variable thats available before the form opens and change the query
to get the value there.
hth
Roger



"Mark Kubicki" wrote:

> on my main form [frmSpec] I have a combo control [cboManufacturer], and a
> subform [fsubManufacturerAlternates]
>
> On that subform [fsubManufacturerAlternates] is the combo control
> [cboManufacturerAlt] whose data source is written as
>
> SELECT Manufacturers.ManufacturerName
> FROM Manufacturers
> WHERE
> (((Manufacturers.ManufacturerName)<>[Forms]![frmSpec]![cboManufacturer]))
> ORDER BY Manufacturers.ManufacturerName;
>
> however, it is not finding <>[Forms]![frmSpec]![cboManufacturer]
>
> where should I be looking for this error?
>
> I've checked the spelling,
> and
> the field Manufacturers.ManufacturerName , as well as it's source
> Manufacturers are correct
> and
> when I type into the "parameter not found" prompt the value of
> cboManufacturer, the query presents properly...
>
> thanks in advance,
> Mark
>
>
>

 
Reply With Quote
 
 
 
 
Mark Kubicki
Guest
Posts: n/a
 
      17th Aug 2009
i confused:
behind the control's "got focus" event there is code to requery the row
source, this is when the error occurs (not when the form opens) and ther
will always be a value in the field: forms!frmSpec.manufacturer?


"roger" <(E-Mail Removed)> wrote in message
news:2F522653-E4E9-44B9-A556-(E-Mail Removed)...
> Its timing. there is no value in the control at the time the form opens.
> you could do a number of things:
>
> 1: unbind the subform and use the mainform's oncurrent event to update
> the
> subform.
> or
> 2: store the value (from the main form) somplace else. another form, a
> memory variable thats available before the form opens and change the
> query
> to get the value there.
> hth
> Roger
>
>
>
> "Mark Kubicki" wrote:
>
>> on my main form [frmSpec] I have a combo control [cboManufacturer], and a
>> subform [fsubManufacturerAlternates]
>>
>> On that subform [fsubManufacturerAlternates] is the combo control
>> [cboManufacturerAlt] whose data source is written as
>>
>> SELECT Manufacturers.ManufacturerName
>> FROM Manufacturers
>> WHERE
>> (((Manufacturers.ManufacturerName)<>[Forms]![frmSpec]![cboManufacturer]))
>> ORDER BY Manufacturers.ManufacturerName;
>>
>> however, it is not finding <>[Forms]![frmSpec]![cboManufacturer]
>>
>> where should I be looking for this error?
>>
>> I've checked the spelling,
>> and
>> the field Manufacturers.ManufacturerName , as well as it's source
>> Manufacturers are correct
>> and
>> when I type into the "parameter not found" prompt the value of
>> cboManufacturer, the query presents properly...
>>
>> thanks in advance,
>> Mark
>>
>>
>>



 
Reply With Quote
 
roger
Guest
Posts: n/a
 
      17th Aug 2009
try the "AfterUpdate" event

"Mark Kubicki" wrote:

> i confused:
> behind the control's "got focus" event there is code to requery the row
> source, this is when the error occurs (not when the form opens) and ther
> will always be a value in the field: forms!frmSpec.manufacturer?
>
>
> "roger" <(E-Mail Removed)> wrote in message
> news:2F522653-E4E9-44B9-A556-(E-Mail Removed)...
> > Its timing. there is no value in the control at the time the form opens.
> > you could do a number of things:
> >
> > 1: unbind the subform and use the mainform's oncurrent event to update
> > the
> > subform.
> > or
> > 2: store the value (from the main form) somplace else. another form, a
> > memory variable thats available before the form opens and change the
> > query
> > to get the value there.
> > hth
> > Roger
> >
> >
> >
> > "Mark Kubicki" wrote:
> >
> >> on my main form [frmSpec] I have a combo control [cboManufacturer], and a
> >> subform [fsubManufacturerAlternates]
> >>
> >> On that subform [fsubManufacturerAlternates] is the combo control
> >> [cboManufacturerAlt] whose data source is written as
> >>
> >> SELECT Manufacturers.ManufacturerName
> >> FROM Manufacturers
> >> WHERE
> >> (((Manufacturers.ManufacturerName)<>[Forms]![frmSpec]![cboManufacturer]))
> >> ORDER BY Manufacturers.ManufacturerName;
> >>
> >> however, it is not finding <>[Forms]![frmSpec]![cboManufacturer]
> >>
> >> where should I be looking for this error?
> >>
> >> I've checked the spelling,
> >> and
> >> the field Manufacturers.ManufacturerName , as well as it's source
> >> Manufacturers are correct
> >> and
> >> when I type into the "parameter not found" prompt the value of
> >> cboManufacturer, the query presents properly...
> >>
> >> thanks in advance,
> >> Mark
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are: "Control Source" , "Row Source" and "Row Source Type" ? ali Microsoft Access Forms 1 14th Jan 2008 03:12 AM
How do I set a subform variable to the source object of a subform control? Anthony Microsoft Access 2 9th Jan 2007 06:33 PM
How do I set a subform variable to the source object of a subform control? Anthony Microsoft Access Forms 2 9th Jan 2007 06:33 PM
How do I set a subform variable to the source object of a subform control? Anthony Microsoft Access Form Coding 2 9th Jan 2007 06:33 PM
Change Subform within Subform record source proptery to paramter query sales@lunaraccents.com Microsoft Access Queries 2 30th Oct 2005 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:10 AM.