stLinkcriteria no longer working (since 2007 upgrade)

We have just upgraded to 2007 and are having a few minor problems. I've seen
similar threads online but can't find the solution exactly for us.

If I open a report then it shows the report with ALL the records.

If I open it with a button with this code, it shows ALL the records:

    Dim stDocName As String
    stDocName = "rCertificate"
    DoCmd.OpenReport stDocName, acPreview

However, the moment I add stLinkcriteria it fails. This used to work under
the old Access but simply won't work now, i.e. NO records show up:

    Dim stDocName As String
    stDocName = "rCertificate"
    stLinkCriteria = "[fIDNumber]='" & Me![fIDNumber] & "'"
    DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

fIDNumber is an alphanumeric string (hence the single quotes around it).

I have no idea what is wrong with it and can only assume that it's due in
part to a change in Access.

0
arathra
6/7/2010 3:28:21 PM
access.reports 4434 articles. 0 followers. Follow

1 Replies
1424 Views

Similar Articles

[PageSpeed] 24

Well,

the code seems fine if the criteria really is a string.
Did you already tried to create a new form with the same recordsource?

Regards
Jörn

Am 07.06.2010 17:28, schrieb arathra:
> We have just upgraded to 2007 and are having a few minor problems. I've seen
> similar threads online but can't find the solution exactly for us.
>
> If I open a report then it shows the report with ALL the records.
>
> If I open it with a button with this code, it shows ALL the records:
>
>      Dim stDocName As String
>      stDocName = "rCertificate"
>      DoCmd.OpenReport stDocName, acPreview
>
> However, the moment I add stLinkcriteria it fails. This used to work under
> the old Access but simply won't work now, i.e. NO records show up:
>
>      Dim stDocName As String
>      stDocName = "rCertificate"
>      stLinkCriteria = "[fIDNumber]='"&  Me![fIDNumber]&  "'"
>      DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
>
> fIDNumber is an alphanumeric string (hence the single quotes around it).
>
> I have no idea what is wrong with it and can only assume that it's due in
> part to a change in Access.
>

0
UTF
6/7/2010 3:37:00 PM
Reply:

Similar Artilces:

Why is MS working on IE9 when IE8 is so bad?
New, fresh install of Windows 7 32-bit. Problems with IE8: 1. "Internet Explorer has stopped working." No solution is ever found. 2. "Internet Explorer cannot display the webpage." I tried all of the solutions from the knowledge base with no luck. 3. When exiting IE8 with more than 1 tab open, it will not exit until you click on one of the tabs, usually the one that is flashing a different color. Any ideas? Seawolf Did you format the HDD prior to this "fresh install?" Tips for solving problems with Internet Explorer http://windows....

HELP!!! Exchange 5.5 Crashed, eseutil /r didn't work
I have a PowerEdge 2400 single PIII-733mhz, 1GB Ram running Windows 2000 Server and Exchange 5.5. The Exchange server is on Drive C, the Store & Logs are on Drive D: with rest of data. There is currently 6gbs Free space on Drive D: (I know, but we are migrating to Windows Small Business Server 2003 in 4 days) Yesterday at 4:41PM our PowerEdge Server Froze, I was already gone for the day. I came in today and noticed it. I did a reboot of the server and the MSExchangeIS, SA, MTA, DS didn't start. Event ID 5000 and 1120. I attempted ESEUTIL mh on pub and priv edb. Both show inc...

I can't seem to get Outlook 2007 working
I am running Office 2007 with Vista. I have recently tried to get Outlook 2007 working but when I use the wizard to set it up with POP3 etc and the usual incoming server details (which are all correct) it won't accept my password/login for my mail server. I know it is all correct but it just won't go on to set up. Any ideas? In article <A6D9D38F-2CC7-4B6B-82B4-D186D8761C3F@microsoft.com>, Richard@discussions.microsoft.com says... > > I am running Office 2007 with Vista. I have recently tried to get Outlook > 2007 working but when I use the wizard to set ...

Query in code not working
I'm trying to do the following: Set rstQueryData = db.OpenRecordset("Select * from qryAllParticipants" & _ "Where DateRecieved >= #" & Me.txtBegin & "# and <= #" & Me.txtEnd & "#, dbOpenSnapshot") I have of course declared all the required variables. I never know where to put the #'s and the quotes etc. DateRecieved, txtbegin and end of course are date fields. aryAllParticipants has as it's criteria the two text boxes on a form and is an aggregate query with several Group by's and one Sum field. Al...

Drag and Drop from 2007 Excel and Word File Open and File Save win
One one of our Windows XP SPK3 computers were running Office 2007. When ever your using Word or Excel and you use either the File Open or File Save commands and the Windowed Dialog Box appears with your file and folder listings it will not let you move or drag and drop a file from one location to another. Lets say you have 3 Sub Folders in My Documents ( Folder 1, Folder 2 and Folder 3 each containing files.) You notice while in the File / Open or File / Save Dialog Box window that their are several files which currently reside in the My Documents folder but should be in say ...

Working with weekdays
Hi, I am trying to add and subtract weekdays. Example I must schedule the delivery of the printer two days prior to the scheduled 7/10/2006 training date. High Level Formula: Training Date - 2 days lead time = delivery date What commands should I use to calculate the delivery date? Assuming you do not want to include weekends as delivery dates. =WORKDAY(A1,-2) Where your training date is in A1. You can also have this ignor holidays. List your holidays in a range say C1:C10. Your formul would then be, =WORKDAY(A2,-2,C1:C10) If you want holidays and weekends included then...

Fresh install: Password no longer works
I recently fixed a computer with a failing harddrive. I was able to create an image and navigate but not get the restored image to boot to windows.... Long story short, after a fresh install of windows xp and Money 2004 (same version installed before), I copied the "My Documents" folder from the image to the new OS. That folder contained all the backups for Money. Now when Mr. Customer opens the backup file, his password will not work. I guess the reason for a question I am sure has already been answered.....I will be explaining how to fix it via e-mail to an unsavy individual...

stLinkCriteria
This is the code in my button on a form that opens a pop-up form. Dim stDocName As String Dim stLinkCriteria As String If IsNull(Me.PrintDate) And IsNull(Me.Date) Then MsgBox "You did not enter a Work Order. Enter a Work Order, including the Date, then press the Submit And Print Order Button." Cancel = True Date.SetFocus Else Me.Refresh stDocName = "ADAfrm" DoCmd.OpenForm stDocName, , , stLinkCriteria End If What does stLinkCriteria do? ADAfrm is a pop-up form with a yes and no button that print...

office 97 professional eligible to upgrade t 2007 Office Professio
Hi I copied the following list from another discussion. Is this list still accurate for Office Professional 2007 Upgrade? "The qualifying older versions that allow you to use an upgrade Office 2003 package are any of the following. The qualifying product can be a retail or OEM edition. Office XP Developer, Office XP Professional with FrontPage®, Office XP Professional Special Edition, Office XP Professional with Publisher, Office XP Professional, Office XP Small Business Edition, Office XP Standard, Office 2000 Developer, Office 2000 Premium, ...

ADODB Recordset won't work
Greetings: I keep getting "No value given for one or more required parameters," when trying to open a recordset. Here's the pertinent code: Dim rsProgram As ADODB.Recordset SQLStmt = "SELECT * FROM tblPrograms WHERE Mid([strProgramNumber], 6, 2)='" & ProgramType & "';" Set rsProgram = New ADODB.Recordset rsProgram.Open SQLStmt, CurrentProject.Connection, adOpenStatic, adLockOptimistic The error appears on execution of the last line. When I drop the WHERE clause, the code works but, obviously, grabs more records than I need. I...

Pasted formula doesn't work unless "re-initialized"
I'll apologize in advance if this has already been answered but I couldn't come up with a search phrase to find an answer. I have an existing worksheet which I have been using successfully for all of 2006 but now I want to add rows for 2007. Whether I copy and paste, or drag a formula down from the last existing row, the new cells display the value that was in the original cell rather than the new value that the formula in the new cell should rerturn. When I click on the cell to display the formula in the formula bar, the formula looks fine but if I select any portion of the ...

GP10 Upgrade stuck at Dynamics table update
My options are to view details, and no tables show up, or Update, and nothing happens, or cancel. I saw a few threads but nothing applies. I have GP 10 installed on SQL 2000 with the Cdn payroll July 1 tax update (I believe this is SP2 included)? Pleeeease help. I am way behind already. thanks I had a similar situation at a customer a few months back. Here is what GP needed to do to resolve it: 1. Start the update of the DYNAMICS database and choose to not convert security. 2. STOP at the Update Tables window during the DYNAMICS database upgrade. Leave this window up. 3. Go to Sta...

Publisher 200 security upgrade Sept 12
Hi I am unable to cut and paste objects, tables anything after upgrading my publisher 2000 based systems with the latest security upgrade. Is anyone else experiencing problems? I have to reinstall to remove the upgrade. Any other suggestions? I have 6 computers that are now having problems with publisher Thanks, Lesb I have 2000. doesn't seem to be an issue with my system. The only thing it did to me was to change my system from using Pub 2003 as the default program to Pub 2002. No wonder it looked different! -- JoAnn Paules MVP Microsoft [Publisher] "Lesb" <...

Forwarding rule not working
Hello! I have Outlook 2003 connecting to an SBS 2003 server. I have an Outlook rule (not client-only) set up to forward one particular email to my pager (mail from Vonage telling me I have a voice mail) and then move the mail to a "Vonage Voice Mail Alerts" folder I added under my Inbox. If I run the rule manually, the message gets moved, but I never get a message on my pager (tried it to my cell phone and it failed as well). If I manually forward one of the voice mail messages, it makes it to my pager and/or cell phone. What is the difference between manually forwarding it ...

Default DOCX file to open w/ Word 2007 and DOC to open with Word 2
Hi, I am trying to convert several hundred mail merge documents from Word 2003 to Word 2007. Currently, if I double click a document to open it, it opens in whichever version of Word was run last. What I would like, is for ..DOC files to open in 2003 and .DOCX files to open with 2007. I've tried to change the file types to do this, but can't make it 'stick'. Any suggestions? To prevent the two Word versions from "competing" over the file associations, see the "Hacking the Registry" section of the article at http://www.gmayor.com/Toolbars_in_wor...

Protection is working sparadically
Running into a strange deal with my Excel...I've protected and saved my sheet the protection seems to work for the most part as far as formatting is concerned - as I can't change any formatting. However, when I attempt to change data it won't let me for the first three or so cells I try and then it gives in and lets me change all of the data I want to yet not the formatting....any thought? The cells you can change are not locked. Sheet protection is a two-step process. First, using Format;cells;Protection tab, unlock all the cells that you want to be able to enter data i...

excel 2007
I have data that looks something like this account#, invoice amount 1, 50 1, 70 1, 80 2, 10 2, 50 2, 52 2, 50 3, 10 4, 30 I need a way to combine all the invoice totals for each account so I have results like this 1, 200 2, 162 3, 10 4, 30 Any suggestions on how to go about doing this? I thought I had done something similar to this with filters before in Excel 2003, but I can't figure out how I did it. Thanks! You can use subtotal or a pivot table in the pivot put the account numbers in the row field and the invoice amount in the data, in subtotal use at each change in account numb...

Currency Format not working
Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form]. [txtAcctTotal],"Currency") Format: $#,##0.00;($#,##0.00)[Red] I have also tried the following Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form]. [txtAcctTotal],"$#,##0.00;($#,##0.00)[Red]") In both cases, the Color is NOT Red when the value is negative. Can someone explain why? On Wed, 27 Jan 2010 14:50:05 -0800 (PST), iamnu <iamnubw@gmail.com> wrote: >Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form]. >[txtAcctTotal],"Currency") &...

Outlook 2007 problems 03-08-10
Hello guys, When I run Outlook, the first thing I see is Outlook Today, which is good. But I cannot see my calendar entries on it. I have my work schedule, birthdays, public holidays all in separate calendars in outlook, but none of them show up on outlook today at all, I've search the net but cannot seem to find the answer help please... Are they all in subfolders of the default calendar or do you have anything IN the default calendar folder? -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/out...

my e-mail dose not work in office 2007
i am trying to e-mail from office 2007 i have to icon but when i click on it nothing happens do i have to activate it "glo" <glo@discussions.microsoft.com> wrote in message news:8D3ED581-F3ED-4C6A-9048-893EC1F57761@microsoft.com... >i am trying to e-mail from office 2007 i have to icon but when i click on >it > nothing happens do i have to activate it And your email client is? -- Asking a question? Please tell us the version of the application you are asking about, your OS, Service Pack level and the FULL contents of any error message(s) See if your mail p...

stLinkCriteria Syntax
I am unable to get my syntax working for my four criteria. Can anyone suggest what is wrong? stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _ And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _ And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _ And [DivisionCode] = '" & Me.Text221 & "' & "'" The line continuation characters cannot be inside the quotes. stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & ...

Can't get SUM function to work in Excel 2000
I don't know what I'm doing wrong. All I'm trying to do is add a column of numbers. In cell L13, my formula is =SUM(L2:L12). All I get back is 0. I've checked the formatting of the cells and they are all numeric. I have also tried adding cells manually, e.g., =L2+L3 -- and I get the correct result. I'm pretty sure I've used this function before without any problems. What am I doing wrong? I was having a little problem with setting the formatting. Most of my spreadsheet contains wrappable text, and I had set the style for that. Then when I tried to adjust my num...

Transparency graphic option not working on Excel Charts?
Can anyone help me to turn on the "transparency" option for Excel Charts? In each type of chart I select and then try to create a transparent color... there is the option, but it's not available for me to use. Is there a way to turn this on? Hi, Transparency is not support in windows based XL. I think the Mac guys have it. Here is a work around from John Walkenbach, that might be useful. http://j-walk.com/ss/excel/usertips/tip071.htm Charles wrote: > Can anyone help me to turn on the "transparency" option for Excel Charts? In > each type of chart I sele...

Links Not Working #4
Nothing happens when I click on URLs in my emails. A new window used to open up & display the web page. Anyone know what I can do to fix this? Lu <anonymous@discussions.microsoft.com> wrote: > Nothing happens when I click on URLs in my emails. A new > window used to open up & display the web page. > > Anyone know what I can do to fix this? Try this: in Internet Explorer, click Tools>Internet Options>Programs>Reset Web Settings -- Brian Tillman ...

Out of Office Assistant not working #2
Hi I have a user who is having problems with Out Of Office Assistant. When he sets the Assistant, no one receives an e-mail back saying he is out of the office. I have tried this on another PC, and it still does not work. I have set up the Assistant for another e-mail profile on his PC and it works. I think there has to be a setting on Exchange Administrator for this. Has anyone seen this problem before? Regards Are you trying this for both internal and external mail recipients? -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -...