I am using below code for reporting purpose, everything was fine but all of sudden this code started giving error saying Singular expression refer to nonexisting object
I also break the whole code bit by bit & able to trace the problem but confused what to use in there & why its giving that error statement.
if I remove following part I am able to get the results & relevance works perfectly fine but that will break the formatting which required to csv output.
(html it) of concatenations of
<?relevance
(html it) of concatenations of ( "%22" &
name of computer of it & "%22|%22" &
name of issuer of action of it & "%22|%22" &
name of action of it & "%22|%22" &
status of it as string & "%22|%22" &
state of action of it & "%22%0d%0a"
)
of results of bes actions whose (name of it starts with "Config_item")
?>
I was able to solve it, actually the output which this code is generating against each from was not available for some property which cause the problem.
after I made the below changes into it with else condition it solve the problem.
(html it) of concatenations of ( "%22" &
(name of computer of it | "None") & "%22|%22" &
name of issuer of action of it & "%22|%22" &
name of action of it & "%22|%22" &
status of it as string & "%22|%22" &
state of action of it & "%22%0d%0a"
)
This line actually helped in solving this - (name of computer of it | "None")
Related
gives me
when saving records in the system.
Can anyone let me know what is the problem in this?
xx = DLookup("[part_number]", "tblModelCost", "[Customer_ID]= " & me.Customer_ID & " and [Model] = '" & me.[txtModel] & "' and [Description] = 'screen'")
Looks like Me.Customer_Id should be Me!Customer_Id. However, that depends on the form control name and what you are trying to do. Assuming you have a control named "Customer_ID" and a field named "Customer_ID" Me.Customer_ID will try to use the the control value, me!Customer_ID will try to use the underlying bound field value. If you don't have a control named Customer_ID then using Me.Customer_ID will cause the error you are getting. (This is why you want to learn to use controls names like txtCustomer_ID for your controls. )
I have multiple combo & text boxes to search for different values in my main table on my front end. The code is as follows, just replicated for different types etc. This all works fine.
If Not IsNull(Me.strSearch) Then
strWhere = strWhere & "([tbl_Main.Description] Like ""*" & Me.strSearch & "*"") AND "
End If
My Problem is, I'm trying to create a text box which searches 2 columns simultaneously in my tbl_Main (tbl_Main.LessonsLearnt & tbl_Main.RecommendedAction) but can't figure out how to modify my current code to add another column in, searchable from the same textbox.
Disclaimer: I'm very much a beginner in MS Access - so please keep the explanation as simple as possible :D
If you need any other info - just let me know!
Thanks in advance
strWhere = strWhere & "(tbl_Main.Description Like '*" & Me.strSearch & "*' OR tbl_Main.OtherField Like '*" & Me.strSearch & "*') AND "
This will search for the strSearch being in either Desscription or OtherField. I also replaced your double double quotes with single quotes for better code readability and cross compatibility with other DBMS and removed the brackets that are only needed if you have spaces in your table/field names (something you really should never do anyway).
I have a query named "TeacherDistributions" includes the following :
TeachertorName Subject Class
and I use the code below to retrieve the teacher name according to value of two text boxes. However, it retrieves no teacher name. Am I mistaken in my code please ?
=DLookUp("[TeachertorName]","[TeacherDistributions]","[Subject]='" &
[txtSubject] & "' AND [Class]='" & [txtClass] & "'")
The code is correct, so either you feed the wrong values as parameters or a record for those parameters doesn't exist.
I'm New to MS Access, I'm working on a project for work at the moment and have run into a snag. I'm not sure if I'm doing this right, I made the mistake of making a simple access db to track my workload, and suddenly i'm "The database guy"
So We've recently started a new product review team within the company, and the database im designing is going to help manage the new part introduction process.
I've got our review sheet designed, which will be called up whenever a part is reviewed. I have not made any relationships to this table because at any time a top level part we've reviewed could be a component to a new kit. So doing master/child parts isn't much of an option. (At least from what i can see)
How i have this sheet being called is as follows. We enter in some top level information in the main form (frmDPARTOP) regarding the review, Customer, Revision, PO, etc.. In a subform (frmDPARPARTS Subform) we list Every Part associated with this, including itself.
I've run into some problems getting the next part to work
I have an unbound text box (Text14)on the subform that is supposed to be looking for records in table (tDPARSHEETS) based on the appropriate Customer, Part_Number, and Revision. If it finds a record on file matching these three fields, its value is set to change to "On Record" or "Needs Review" if its unable to locate a file. However, it is always indicating "Needs Review" .LocalPartNumber and LocalRevision are in the table tDPARSHEETS, I've tried several variations, looking for different items, different ways. I've debug printed the values, and they are correct.
If DLookup("LocalPartNumber", "tDPARSHEET", "[LocalPartNumber]="" & Me.Part_Number & ""AND [LocalRevision]='" & Me.Revision & "'") Then
Text14.Value = "On Record"
Else
Text14.Value = "Need Review"
End If
The Other issue i'm experiencing is based on the same situation. I would like to be able to double click the items listed in the Subform and pull up the record on file if there is one, if there is not, i would like to create one, with the information already provided filled in. I've put a test entry in with the Customer, Part Number, and Revision filled out. The MsgBox Fires telling me the record is on file, However, the OpenForm command opens to a blank form.
Private Sub Customer_DblClick(Cancel As Integer)
If DLookup("LocalPartNumber", "tDPARSHEET", "LocalRevision ='" & Me.Revision & "'") Then
MsgBox "Record Found"
DoCmd.OpenForm "frmDPARSHEET", , , "[LocalPartNumber]="" & Me.Part_Number & ""AND [LocalRevision]='" & Me.Revision & "'"
Else
MsgBox "No Luck"
End If
All fields I'm working with are Text Fields, as our part numbers and revisions often include letters and numbers
I'm sure there is a better way to do this entire process in general, but We are rolling out an entire new ERP system in May, and i'm under the impression that this is meant to hold us over until then. I would like to have it built well enough to work indefinitely (as we have a hard time letting go of things), but in reality this could all be thrown away in 6-8 months
I Appreciate any Advice/Help
Have in mind please, that DLookup returns Null for "not found". Also, be careful with spaces. Thus:
If IsNull(DLookup("LocalPartNumber", "tDPARSHEET", "[LocalPartNumber]=" & Me.Part_Number & " AND [LocalRevision]='" & Me.Revision & "'")) Then
Text14.Value = "Need Review"
Else
Text14.Value = "On Record"
End If
If partnumber is text, you need to wrap that in quotes as well:
If IsNull(DLookup("LocalPartNumber", "tDPARSHEET", "[LocalPartNumber]='" & Me.Part_Number & "' AND [LocalRevision]='" & Me.Revision & "'")) Then
Text14.Value = "Need Review"
Else
Text14.Value = "On Record"
End If
I am developing a SSRS 2008 R2 RDL with a chart. Currently, I have a subreport built into this chart where if they click on a pie piece it goes directly to this subreport. It is currently configured as an action on the series via "Go to Report".
However, my customer wants it to instead open a new browser window so that they can still see original chart without having to rerun my report. Also, this subreport requires several input parameters. I tried the "Go to URL" Action link instead and entered the URL there. But this didn't work cause I couldn't pass in my input parameters. How can I do this?
This subreport takes multiple parameters. I have it configured as:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render&startdate="+Parameters!startdate.Value+"&enddate="+Parameters!enddate.Value+"®ion="+Parameters!region.Value+"&state="+Parameters!state.Value+"&office="+Parameters!office.Value+"&status="+Parameters!status.Value+"&program_hyperlink="+Fields!program_code.Value+"&funding_source_param="+Parameters!funding_source.Value+"'))"
But when I try to click this subreport it is not clickable.
I also tried this, but this exceeds the 255 character count:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render&startdate=" & Parameters!startdate.Value & "&enddate=" & Parameters!enddate.Value & "®ion=" & Parameters!region.Value & "&state=" & Parameters!state.Value & "&office=" & Parameters!office.Value & "&status=" & Parameters!status.Value & "&program_hyperlink=" & Fields!program_code.Value & "&funding_source_param=" & Parameters!funding_source.Value & "'))"
I also tried this, but this was not clickable either:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render
&startdate="+Parameters!startdate.Value+"
&enddate="+Parameters!enddate.Value+"
®ion="+Parameters!region.Value+"
&state="+Parameters!state.Value+"
&office="+Parameters!office.Value+"
&status="+Parameters!status.Value+"
&program_hyperlink="+Fields!program_code.Value+"
&funding_source_param="+Parameters!funding_source.Value+"'))"
I'm looking at the last code snippet that you tried and here is my feedback:
The report path doesn't look correct. Should be in the format http://evolvdb/ReportServer/Path/To/Report&Parameters=XX
You can't concatenate strings in SSRS with + and need to use & instead.
Example:
="javascript:void(window.open('http://evolvdb/ReportServer/Incoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render
&startdate=" & Parameters!startdate.Value & "
&enddate=" & Parameters!enddate.Value & "
®ion=" & Parameters!region.Value & "
&state=" & Parameters!state.Value & "
&office=" & Parameters!office.Value & "
&status=" & Parameters!status.Value & "
&program_hyperlink=" & Fields!program_code.Value & "
&funding_source_param=" & Parameters!funding_source.Value & "'))"
My general advice for creating SSRS links is to take your browser and start there with zero programming. Ensure that your report path is correct, then manually add a parameter and ensure the report accepts the parameter value correctly. Once you have a working URL example, create a textbox in your report that spits out the URL string you are trying create. This is an easy way to ensure you are getting the expected output and you can compare to the URL that you manually crafted in the first step. Lastly, put the finished expression into the "Go to URL" action and you should most likely have a link that works as expected.