ListBox not working after "Upsize"

detrie

Registered User.
Local time
Today, 07:36
Joined
Feb 9, 2006
Messages
113
Hi All,

I just "upsized" an mdb front and back end SQL Server Express using the upsize wizard.

I have a sub-form with a list box that does not seem to work. Here is the recordsource:

SELECT tblProjectSegment.strSourceCodeID, tblProjectSegment.strEventCodeID, tblProjectSegment.lngProjectCodeID, tblProjectSegment.SourceCodeLink, tblProjectSegment.strStatusID FROM tblProjectSegment WHERE (((tblProjectSegment.lngProjectCodeID)=[Forms]![frm_ProjectData]![frmSourceCodeInfo].[Form]![lngProjectCodeID]) AND (Not (tblProjectSegment.strStatusID)="utad")) ORDER BY tblProjectSegment.strSourceCodeID;

Any help?
TIA
 
Did you make sure to check the table name to see if it has changed? Usually it does when upsizing and Access won't update your rowsource queries automatically when upsizing.
 
Hi Bob,
Thanks for your response.
I tried recreating the rowsource. When I enter the [lngProjectCodeID] criteria "[Forms]![frm_ProjectData]![frmSourceCodeInfo].[Form]![lngProjectCodeID]" Access complains with 'Unicode Literals' support not available in this server version.
 
Don't know if this will help, but I found it here:
http://groups.google.com/group/micr...4f3c83e8007/5698a3ed6421b875#5698a3ed6421b875

From Andy Baron on Microsoft.Public.Access.ADP.SQLServer
Unfortunately, the help file is misleading on the this topic. It
states that you can use Form!ControlName to refer to a control, but
that doesn't work. You need to use:
ParamName Type = Forms!FormName!ControlName
even if the control is on the current form. For multiple parameters,
just separate the data with commas. So if you need to do this in code,
use something like (on one line):
Me.InputParameters = "@txtEmployee varchar(20) Forms!MyForm!MyControl,
@intYear int = Forms!MyForm!MyOtherControl"

Another option, if you are doing this in code rather than using the
design-time properties on the form, would be to evaluate the controls
and contactenate in the values:
Me.InputParameters = "@txtEmployee varchar(20) '" &
Forms!MyForm!MyControl & "', @intYear int = " &
Forms!MyForm!MyOtherControl"


You'll want to change the InputParameters before you change the
RecordSource, so you pick up the new values when the form is
requeried. If you aren't changing the record source, you'll want to
requery the form (me.requery) after updating the controls used in
InputParameters.
 

Users who are viewing this thread

Back
Top Bottom