I have a report that displays simple date fields. One of the fields is "lease execution". On the report, I want "lease execution" to display differently depending on the date the report was run.
So:
- If the "lease execution" date is more than 120 days away from today, I want it to display as Q YYYY. - If the "lease execution" date is between 120 and 90 days away from today, I want it to display as MM/YYYY - If the "lease execution" date is 90 days or less away, I want it to display the normal date MM/DD/YYYY
I was thinking I would need to do DateDiff() to figure out an amount of days that's between Now() and [Lease_Execution]. Then based on that amount make the report show it differently. Pseudocode would be: if DateDiff() = 40, then display [lease_execution] as MM/DD/YYYY
I am trying to show an image on a form based on a user choice from a drop down box. For example, the user needs to choose a priority for a task. If the user chooses "Immediate" I want an image of an exclamation point to show up to draw attention that this is important.
I am creating a repayment schedule (as a report) and I want to display a series of fields as a column which return (show) a date one month after the date in the field above.
The first repayment date field (Line 1) will show a date one month after the loan was paid out. the Next field below will show the date one month later.
I can't simply insert the "Date + 30" because that would get out of since over the year. If the loan was issued on say the 15th of January, I need the first field to display 15th February and the next would be .... 15th March.... Yes - You've got it!
Now I could do that in Excel, but I don't know how to get Access to do it.
I am trying to run graph on a report from query but what's happening is query shows name but report on graph shows ID'S of the field .
Below is my query
SELECT tblMainTWTTPSheet.txtRootCause, Count(tblMainTWTTPSheet.txtRootCause) AS CountOftxtRootCause FROM tblMainTWTTPSheet GROUP BY tblMainTWTTPSheet.txtRootCause, tblMainTWTTPSheet.Date HAVING (((tblMainTWTTPSheet.txtRootCause) Is Not Null) AND ((Count(tblMainTWTTPSheet.txtRootCause)) Is Not Null) AND ((tblMainTWTTPSheet.Date) Between [Forms]![frmStratificationOfRootCauses]![startDate] And [Forms]![frmStratificationOfRootCauses]![endDate]));
My bound column on main menu form and back end table is 1
I have an image within the attachment field on a table.The particular table is not linked with the data within the report.I tried to use DLookup but found it only showed the picture name i.e. signature.png..How can I display an image (in fact the only image) in the attachement field on another table within the report?
However, the data is now showing on the generated invoice.The rest are showing up but one.I went back to the tables to check and there is data present.It used to work until recently.
I have a continuous subform which queries a table of attachments. I'm using Access 2007 but not using the Attachment datatype; this DB will grow considerably and I don't want to waste precious space by filling it with bulky files. So instead, I have code which makes a copy of the attachment and adds the hyperlink (to the copy) to the table instead.
Now - I want to add a control to the subform to display an icon / image reflecting the file type of the attachment (Word doc, Excel s/s, PDF etc.)
But not sure how to go about it.
I was thinking I could use FileSystemObject.GetFileExtension at the point in the code where the attachment is added, and add a new field to my attachments table (i.e. translate "*.xls*" to "Excel", etc.) Then store / embed a handful of images for the core types I would expect and use an image control on the subform to display the image based on the value of that field.
But is that even possible / feasible?
Or, is there a handy API which can retrieve the icon associated with a file type based on what has been installed on the local machine (even if there is, there's still the problem of setting up the image control to display the appropriate icon specific to each record...)
Or, is there another control available which would be better suited to something like this than an Image control?
I'm working with a report that totals the number of times a topic is returned from a query. If a topic is not returned at all, i don't want it to show at all. Currently it is showing a blank field for that topic name and blanks in the count as well. Here's the filter i've put in to pull the right data out of my query: =Sum(IIf([Caller Used Resources]="No",1,0))
I am trying to show a certain subform based on whether or not a field is blank or null. This database is not owned by me--it's what we use to run queries and reports on the data on a centralized server for the library. It's not even in the same city--so changing the tables is not an option for me.
So, I have a subform (subform1) that is linked to the main form based on 2 fields (BibID and Item_Enum). The trouble is that the second field (Item_Enum) is sometimes blank, so the subform will not display. So I created another subform (subform2), which is a duplicate of the first one, but this time only linked on the first field (BibID). So, if that second field (Item_Enum) is blank, I want subform2 to display and subform1 to be hidden. If the second field (Item_Enum) is not blank, I want subform1 to display, and subform2 to be hidden.
I've tried putting the VBA code on different events for the form, but I can't get it to work consistently.
There are two problems, one of which I think I have fixed--but I would prefer a better solution. The VBA code doesn't run unless the form is newly loaded. I've tried placing the VBA code on different form events, but nothing works. I want the code to activate whenever a new record is displayed. The work around is that the form IS newly loaded every time the user scans a barcode for a new book. That works now, but if I need to change the way the user looks up new records, this might not work anymore.
The second problem is that the VBA code doesn't display subform1 when Item_Enum is blank. It doesn't display subform2 either, but that's the desired result.
Private Sub Form_Load() If Me.ITEM_ENUM = "*" Then Me.subform2.Visible = False Me.subform1.Visible = True Else Me.subform2.Visible = True Me.subform1.Visible = False End If End Sub
I've tried changing the condition to Me.Item_Enum = null, and changing the false/true results accordingly, but that didn't work either. In that case, only subform2 is visible, whether it should be or not.
I have a report which when I open it by clicking the button in the form shows what looks like Chinese text in the memo field. To open the report the following is in the event properties for the referencing button
Code: Private Sub cmdPrintSumReg_Click() Dim strWhere As String If Me.Dirty Then 'Save any edits. Me.Dirty = False
[Code] ...
When I open the same report from the reports menu on the left of the database it is just fine. But obviously it is showing information for all contracts and not the any one contract.
I haven't changed anything in the table that contains the memo field and this only started happening yesterday afternoon after using this db for over a year.
I found an earlier post in this forum with a similar problem but the only difference I see is that the user changed the field from a text to a memo. I haven't.
I'm an Access novice. I have a query based report that is based on several tables. All tables are joined by the same field "customer ID," but 1 table is not available under "Add Existing Fields." I cannot figure out why that table isn't available, but I need to add a field.
I have an Access 2010 database with a memo field formatted for Rich Text.
I created a simple form. It accepts and shows paragraphs, i.e. I press Return and a new paragraph appears (with a blank line in between paragraphs).
I then created a report based on the same fields. In the memo field it shows the text entered in the form, but not the paragraph breaks. It just shows one big block of text without any paragraph breaks. I have looked for a field property in the report design and layout views that might affect how the text is displayed in the report but I cannot find one.
It is not much use if you can input paragraph breaks in a form but not see them in a report.
I am a novice to Access and in order to get some training in my workplace I need to show how access can be applied to my role.
I have a table of information consisting of 3 fields:
Motor manufacturer Model Attachment (picture of particular car)
I want to have someone able to select the manufacturer and Model from Combo boxes and this will pull up the image associated with this model.
There are more than 1 model for each Motor manufacturer so you may have:
manufacturer Model Ford Fiesta Ford Mondeo VW Beetle VW Golf Fiat 500
You must not be able to select the wrong model for manufacturer, i.e. Ford 500
The images are currently saved onto the table as an attachment, This may be wrong as well, This may be a simple task to do, but hopefully I can get it running smoothly and show this is the right tool for the job.
I have some images stored in a SQL Table which is linked into Access. These images have to be stored in the database as I also reference them on other platforms (Android, Web etc).
In my Access programme I need to display a continuous form / report showing each image. Now, good old Access cannot display multiple images stored in the database on a continuous form. It can only do this if it is referencing the path to the image.
When the user views the form they will only see about 12 images at a time. I thought of a workaround which is to write the database images back to file to a local temp directory when the user loads the form. The user would be happy to wait for say 10 to 15 seconds whilst the form loads.
However, I cannot find an efficient algorithm to write the images back to a file. The one I am using is a BinarytoString algorithm by motobit which is fine for very small images, but anything over 100kb (which is still pretty small) it goes sooooo slow.
How to quickly write an image stored as a long binary in an Access DB back to a file? Or do I need to crack open my Visual Studio and write some C# DLL to use instead...?
I am building an Access database for a client. It is an employee staffing database. With that being said they would like the ability to automatically populate the "T2PPCD" date field based on what is entered into the "Report Date" field. (Same table)
The date is the Monday after 180 days from the report date.
I already know how to get it to auto fill 180 days from the "Report Date" but I'm not sure how to tell it to give me the Monday after 180 days.
I have a report that pulls a date from a query, but they'd like an option where if they don't want to enter the date, they can check one of 2 checkboxes. Check box 1 would return "N/A" and checkbox 2 would return "TBD.I've never had to do anything with more than 1 checkbox.
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
Is there a way to show the earliest and latest dates of a report generated by a non-date field?
E.g. I generate a report based on Food, and it'll list the days that this food is associated with. Is there a way to show the first and last day that appears in this report (i.e. the range of dates that the report shows based on the food selected)
I have a list of all previous employers for a job applicant. I can enter up to 10 but I only want the boxes to show if there is a previous position for that box. So, if there are 3 previous positions, I want to see 3 lines. If there are 10, I want to see 10. I have fields [Company_1]. [Company_2], etc. I only want company 2 to show if the person has 2 previous positions entered into the form.
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 need to create a New Form control for this situation:
If I enter a date into a field and the choice for another field is equal to a certain value. How can I get the date I entered to be automatically populated into another date field.
For example:
If I enter 11/10/2005 in a date field and I choose either "BN", "BA", or "BT" in a text field, I need that date of 11/10/2005 to be automatically populated in another date field on the same form.