I have a query[view] where I have six employee numbers, I left join these to an Employee table to retreive the names.
I've created a report that uses this query/view as its source. For some reason my report keeps making all six name fields refer to the same control source Employee.Name and not Employee_1.Name, Employee_2.Name, Employee_3.Name,.... respectively.
In design view everything looks fine but when I switch to report view the switch happens, it displays the same name in all fields. When I switch back to design view all of the fields have changed to the same control source.
why this is happening? My tables are in a SQL server.
The [ItemsID] is actually on the form as a txt box. but i dont really need it there for any other purpose other than the vba above.
In the form i have a field that is in the form as a txt box that has a relationship to the ItemsID. i have attached a image of the relationship.
The field that is in the form is tblOrdersItems.OrdersItemsID and i also have tblItems.Items. so rather than adding another meaningless txt box to the form(ItemsID) i would like to be able to use the relationships to get the correct ItemID ...
I have a form which contains fields from my main table and also has a subform containing a query based on a filtered list of my main table.
I have a combobox on the form to select a name and pass it to the query to filter on.
The list of names is in a table called tblnames which has 2 fields, name and ID. I have linked the ID field on this table to a field called nameid on my main table which is a numeric field (and that allows be to select a name from a list when I enter data into my main table.
The xox is unbound, control source empty and row source set to tblname.
The combobox is only showing a list of numbers (I assume they are the id field from tblname). Yesterday I had the list of names showing and I checked a backup and the only difference I can see is the row source property refers to the name field in tblname but I don't know how I got it there. When I click on the list box for row source I only get offered a list of my objects.
I am trying to use a calculated field in a recordset but I am having problem with the script trying to compile.
my record set is
Set rstPrice = db.OpenRecordset("SELECT Period_desc, Price, Round(Price/7,2) AS Daily_rate FROM qryPropertyPriceList WHERE [Our ref] = '" & rstProp![Our Ref] & "' And [Year] = " & rstProp![Next year price base] & " Order By Sequence", dbOpenSnapshot)
The calculated filed I have added in is Round(Price/7,2) AS Daily_rate
If I let it run just with this it runs fine.
and then I try to use this calculated field:
Do Until rstPrice.EOF Temp = Temp & rstHTML!html35 & rstPrice!Period_desc & rstHTML!html36 & rstPrice![Price] & "-" & rstPrice![Daily_rate] & rstHTML!html37 rstPrice.MoveNext Loop rstPrice.Close ' Tidy up Set rstPrice = Nothing
They it stops running and it all seems to be because of the Daily_rate field
I made a report that have 'txtRemarks' field, I just want to get remarks automatically in 'txtRemarks' field based on the other field in report. that is why I used a function like below:
Code: Private Function Estd_Remarks(Estd_Point As Long) As String If Me.Estd_Point < 20 Or Me.Estd_Point = 0 Then Estd_Point = "Earlier Established" Esle Estd_Point = "OK" End If Estd_Remarks = Estd_Point End Function
And I wrote in properties 'On Format' event this code below:
Code: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Estd_Remarks = "Ok" Then Me.txtRemarks = "Ranked & Sortlisted" Else Me.txtRemarks = "Estd_Remarks" End If End Sub
When preview the report then it shows Compile error Argument optional
I have a report that is looking up min and max quality specifications for a product. The table with the specifications has a Yes/No check box field for when the specs are defined as "Internal". So the table looks like Product/MinValue/MaxValue/Internal
I want the report to display "TEST AND RECORD" when the Internal box is checked where the MinValue and MaxValue (that are stored in the table) would be displayed otherwise.
I'm trying to run an if statment, on the records in a field (called "Current_Month"), in an existing table called ""Current_Months_Lag1_Data".
The IF statements work fine - and simply perform a different action for different data in "Current_Month".
I am having problems referring to "Current_Month", where I keep getting 424 (Object required) and 3420 (Object invalid) error messages, on the last line of code.
I have defined & identified the table in which the field is located, yet somehow cannot identify the field within that table. (I've already tried searching the web for similar problems under error messages 424 & 3420).
Function LAG_Forecast_03() Dim dbs As Database Set dbs = CurrentDb Dim Tbl As TableDef Set Tbl = CurrentDb.TableDefs("Current_Months_Lag1_Data") Dim FLD As Field Set FLD = Tbl![Current_Month]
I believe I did this before awhile ago but for some reason I keep getting an error.
I have a Mainform (frmMain) that has a Subform (frmSub). On frmSub I have 2 comboxes (strCom1 & strCom2) one is set to invisible (strCom2.Visible = No).
So using the "On Open Event" of frmMain I want make strCom2 visible if strCom1 = "Read Only". Ofcourse I will also need to place the vba on the On After Update event. Below is what I have so far but doesnt work.
I get Run-time Error 2427 "You enetered an experssion that has no value"
Code:
Private Sub Form_Open(Cancel As Integer) If Me!frmSub.Form!strCom1.Value = "Read Only" Then Me!frmSub.Form!strCom2.Visible = True Else Me!frmSub.Form!strCom2.Visible = False End If End Sub
I am using the following control source for a text box on a report: =nz([Raw_Turb], "---")When I do, it pulls data from a different field from the data source. I am pulling the data directly from the data table. I have tried creating a query and get similar results only from a different data field!I have tried the same control source on a different report and it works correctly! Why does it not work on the current report?
Hi there. I have a report which has multiple pages with multiple running totals. It is an invoice style report producing an invoice run for all customers at once. The invoice detail lines are a subreport for each customer. Every time a customer changes a new invoice page is produced (grouped by customer). If there are no invoice detail lines for any one customer a total is still displayed using the IIF command to avoid #Error totals. A running GRAND total of ALL the invoice totals is displayed as a report footer. The problem I have is when I generate the preview report and flick to the last page to see the grand total it is there no problems. However, when I print it I get a different amount!!! If I then start leafing back through the invoices on-screen - say 20 - 30 customers - then go to the end again the grand total changes again! I know the grand total shown initially, when going straight to the end is correct as I have checked it with queries. The report is 630 pages long. Any ideas as this is driving me nuts! (I assume it has something to do with using the IIF statement or perhaps the subreports?)
I have a database with a bunch of related tables. One holds information on (let's say) types of food. A field in that table tells whether the food is HOT or COLD. Foods are grouped by MEALS in a related table - the PK of the foods table is stored as an field in the MEALS table. What people here are looking for is a report that lists all the foods in each MEAL, the temperature of the food, and whether the meal is HOT, COLD, or MIXED - foods are both HOT and COLD. I've got a report that lists all the FOODs, grouped by MEALs - it's just the overall temperature of the MEAL that I am missing right now.
I have two numeric fields which make up what looks like a full decimalised number ie 20.22 - only I am unable to put the decimal point in between the two numbers.
I thought about putting in an unbound object such as a picture of a full-stop but cant get it anchored at the correct angle to make it look convincing in the report.As this is such a huge database I have tried to amend the tables, but it loses vital data ?
I have a report where I added text then a date field based on a Table. In the table I have specified the "Co_ContractEndDate" for input mask as dd/mm/yyyy, however the format to display as dd mmmm yyyy. This works in the Form and in the report as it's own control text box, however when I merge the field with some text the formating changes.
My report text box is as follows: ="The Program Period for this Program will finish on " & Co_ContractEndDate] &"."
The output in Print Preview is: The Program Period for this Program will finish on 30/06/2013.
I would like to show it as: The Program Period for this Program will finish on 30 June 2013.
As a work around I have aligned the date field with the label field to get the outcome but as it is a sentence I would like to add a full stop at the end. how to show this text box in design view?
I have a database which gathers and stores the odometer readings of our company vehicles every month. I have built a simple report with columns for Vehicle Number, Employee Number, Employee Name, Month, and Odometer Reading. My boss wants a field for each employee which compares the records for the last two months and displays the difference (i.e. the number of kilometers travelled in that month) /
I'm currently creating an invoicing report for a company, and for record purposes they need a dynamic field on the report for the specific Invoice Number of each client they invoice. I have the field set up currently as a text box =[Invoice#] so they have to enter an invoice number when they generate the report. However, when I generate the report and put in a number, I'm getting some whacky outputs.
For example, I've tested it with a test client, and when I give the client an invoice number of 1, the report somehow changes it to 49.
I have a cool little form for the use of the organization's treasurer wherein she enters checks and deposits. I have a query that generates a running sum, so each line in the accounting report based on the table has the account total as of that date. The query behind the report is exactly what I want and is in the correct order. For example, the four transactions for 9/15/2014 are in the order entered, and the line total is correct. The report insists on listing the 4 in the example in some other order with or without OrderBy specified. With code from someone, perhaps on this forum, I added the following to the OnPage event:
Code: Private Sub Report_Page() Const TWIPSPERINCH = 1440 ' Offset from right edge of Control where our ' Vertical Line will start - adjust as you desire. ' Expressed in Twips Dim intLineMargin As Integer
[code]....
The result is a beautiful report (albeit in the wrong order) with vertical lines all the way to the bottom of the page.If I remove the OnPage code, the report is still in the wrong order, so obviously that wasn't the problem. OK, I think it is corrupted. I open a new db, import all into it. Still in wrong order. So next, I begin to recreate the report from scratch. Hooray! Right order! But I still want the vertical lines between the columns. So now, I copy the OnPage code and paste it into the new report's OnPage code. I get error message: "Compile error: User-defined type not defined" with the line "Dim MIPSstr As udtPrtMips_str" highlighted. Ok, I delete all of it and reenter it line for line manually, leaving out the comments. Get the same error message. After trying to research it, the only suggestions were to add Activex reference which can't be the problem, because the other version of the report doesn't throw an error and both are in the same db.
I have attached a clip of the report and a clip of the underlying query. As you can see in the first capture.png, the check numbers are in the wrong order and the amounts in the Total line don't sync with the total above adjusted by the amount on that line.
I have a report that has four fields: Item, Qty, Price and TotalPrice for each line in the detail section. Total Price is calculated by multiplying Qty x Price. The text box name that holds the Total Price for each line is txt_TotalPrice. I want to have a Grand Total in the report footer. I placed a text box in the footer with the following expression: =sum([txt_TotalPrice]). When I run the report Access prompts me for the parameter value of txt_TotalPrice. I've been trying to solve this for quite a while now - but I'm totally baffled.
I have a report and I am trying to Round Up the calculated field SumOfAccrual Amount to 2 decimal places. I am attaching a screenshot of my report and output.
I am creating a report that contains name andd birthdate on one line. I need to have up to seven lines in the report for some groups, but do not want to leave blank lines where no names exist. I am working in 2010 and have read about canshrink in 2007, is this approach availabel in 2010 and for date as well as text?
I have a form with attached subform from which I can choose which records to send to a report. All records in the base table have a comment text field for the user to enter additional data (comments). Typically, there are none, but when there is, if it is only a single record sent to the report, the comment is printed in the page footer. However, if there are multiple records being sent to the report and only one record has text in the comment field, unless it's the last record it the subform, it will not print in the report. There isn't enough room in the detail section to include the comment field (like I said, it's typically not used and when it is, they can be lengthy). Is there a way to get the comment field to print in the report page footer when it is not either the only record selected, or the last record?
I have a Customer table that has a field "PostalCode" that is numerical an is connected to a field called PostalID in a table called PostalCode and has the actual postal code stored in a field call Pcode.
I have everything working ok as far as displaying the correct Pcode on the various forms. eg: is the PostalID is 10, I want the form to display the Pcode of 2000.
I can't figure out how to display the Pcode in a report.....
I've got a report that is displaying addresses which are all identified as 'public' or 'private'. I want to be able to display the 'public addresses' and leave the 'private' addresses blank (but still show other fields.. phone no.s etc). The field that the data appears in is Address 1 (for both public or private), depending on what the data entry clerk has selected as the preferred address (ie public or private).I've been playing with the Iif function, but have not had any success...
Address Type: Private or Public Address1: Address details
In my table, I have a field for "notes" and have it set to long text. It works just fine and has all the text visible. When I create a report or a form from this table, it truncates the text in that field. It limits to the 254 characters of old. I am not sure how to fix this. I have tried setting the WillGrow to yes and it still does not work.
I have a report which is based on a query. The query combines information from TBLDwgReg and TBLDwgRegDtls. The unique field linking these two tables is DrawingNo. The query - QRYDtldDwgReg - is showing 99% of the information I want to see.
My problem is this - one drawing can be revised several times. I have my report grouped by IssuedBy and then grouped by DrawingNo. In the group footer for IssuedBy I want to count the number of drawings issued by a particular consultant. For example...the structural engineer has issued 17 drawings for a particular project but when I do a count it is returning a total 27 because some of those drawings have been revised.
I tried grouping in the query and counting the DrawingNo field there but that's not working either.