Search results

  1. F

    Highest value of an alpha-numeric field

    I have a table which has a text field containing alpha-numeric information, simlilar to the below: 850.1 850.2 860.01 860.04 979 - A 979 - B 1001.2 1001.3 This data is historical, and cannot be changed as it is used outside the database as a reference number. What I need to do is to have a...
  2. F

    Summing an unbound textbox

    Is it possible to subtotal an unbound textbox on a report? I have a textbox which itself contains a calculation as its data source =([txtRateForYear]*52) Now, if I have a record that has that field a number of times, is there a way to have a subtotal at the end of each record, and then...
  3. F

    Looking ahead

    As some of you already know, I work in public transport, and I am thinking ahead about creating a database that will allow us to keep tabs on disruptions that occur on our routes; some disruptions will affect one route, some will affect multiple, and a few will affect all. We have 120+ route...
  4. F

    Extracting the displayed value from a textbox

    I have a text box which is calculates an individual's average number of accidents per year (Total Accidents/Years of Service) - I have this rounded to two decimal places. That text box will be hidden, but the information from it will form part of a text string that is visible. Some people, who...
  5. F

    Custom shortcut menu

    I have a database that when deployed will be used mainly via the Access Runtime environment, and therefore the features to export reports to Excel, Word etc will not be available. In the past, I have used a custom shortcut menu, code as follows: Dim MenuName As String Dim CB As CommandBar Dim...
  6. F

    Query with some sort of sum?

    I have a table (now stuffed full with data), which is serving its purpose quite nicely - however, someone has made a request for data from that table, but in a different way that has thrown me a bit of a curveball. Each record contains a number of fields, but the key ones for this purpose will...
  7. F

    Select Distinct returning duplicates

    I have a combo box which has the following query as its source: SELECT DISTINCT SafeDriving.ID, SafeDriving.SDYear FROM SafeDriving; The field SDYear is a four digit number to represent a year, and is stored as a number. I am trying to get the combo to show only one instance of each...
  8. F

    How best to work this out

    Evening all :) I am trying to decide what is the best way in VBA to have the code check the following: I will have a table which has some employee data (Name, EmployeeID, StartDate), and I am trying to have code take a look at a 'qualifying year', and then give a yes/no answer (which will then...
  9. F

    Query to create a string from 12 fields

    Hi all - been a while since I have been working with Access, so bear with me as I have gotten rusty remarkably quickly. :o I am looking to have a query that takes the data from 12 fields in a record, and then returns a string showing only each value once. These 12 fields contain only a few...
  10. F

    I am being really thick - again!

    I am wanting a query to return only records that have a date that is between today's date and 90 days in the future, but I am getting the criteria wrong. Currently I have <=Date()+90 - what am I missing?
  11. F

    SQL - Syntax Error 3075

    I am trying to copy data from one record to another via VBA/SQL, however I have ran into a problem. Oddly, it has worked without issue a couple of times, but the vast majority of times I get a Syntax Error 3075, and within the error box I can see the start of the text that is contained within a...
  12. F

    SQL to update a number of fields in a table

    I am looking to update a number of fields in a table via VBA - the data values have already been captured, so it is just a case of updating the table with it. I believe that the following will work to update one field: UPDATE RouteRecords Set OperatingRestrictions1 = OpRes1 WHERE...
  13. F

    Date or N/A

    Is there a way to allow a field to contain dates or to have N/A if there is no date to be entered?
  14. F

    Making text from a date

    I have a field that contains a date in dd/mm/yyyy format, and I need to use that to make a text string that is used elsewhere, in the reverse order. For example, today's date is 04/04/2017, so if that date was in the field, I would like my code to turn that into 170404, that will then go on to...
  15. F

    Odd report formatting issue

    I have a report that has a number of groups in it, with each group having its own On Format code. One of the groups is causing me some grief (although, it could be other groups also, and this is simply the first group that I have spotted it with!). The code for the problematic group is as...
  16. F

    Formating of text depending on hidden fields

    I have a report that has two fields - [TS] and [AltTS] TS will always have text in it, whereas AltTS won't necessarily have anything in it. In the event that there is nothing in the field [AltTS], I would like a textbox on the report to show just the value that is in the field [TS]; However...
  17. F

    Conditional formatting a text box

    I have a text box that I would like to conditionally format depending on a couple of factors, but I am struggling to work out what the expression would be to do so, not least because I am not the best at conditional formatting in Access. I have a field [StartDate], and I would like the...
  18. F

    Combo Box - no dupilcate values

    I have a combo box which is used to select records that meet a specific criteria - there may be more than one record that matches this criteria, and I want all of those records to be selected. The field that sets the criteria is called BulletinNumber. This works perfectly well, however the...
  19. F

    Getting a value from a textbox on a report

    I have a few different reports that open depending on which is chosen by the user - the user selects their chosen report name which then is passed forward to a small form via OpenArgs, they then choose which record(s) ahould be in their selected report and the report runs. All of the reports...
  20. F

    Change group background colour

    I have a report which is grouped on a field which shows a Day Type, and I would like the background colour of the group to be changed depending on the value that is in the field. For example, if it says Saturday, I would like the background of that section of the report to be light green; if...
Top Bottom