Search results

  1. T

    Excel macro runs fine when run through excel but error appears when run from access module

    Hi All, I have a module run from access that does a few things then opens an excel file and runs a macro on that excel spreadsheet. Running the excel macro from both excel and access worked perfectly fine. I realised that one of the excel files that will be opened as part of the excel macro may...
  2. T

    How to allow edits to a query

    Hi all, I have a query that gets info from 3 tables. (See attached) However using the links that I have used and require It does not allow edits or additions. I understand why it is not letting me do this but I am asking for the best work around. I would only need to make edits and not...
  3. T

    Dlookup in Excel Files... Or something similar.

    Hi, I am hoping there is a way to lookup a value in multiple excel files from Access VBA. There are multiple excel files in location "F:\EVERYONE\Toby" that all start with "SP2240-170" and end with a date range. This date range will be generated by the Excel file automatically based on data...
  4. T

    Datasheet view vs Form view

    Hi All, I have a form with fields [RER] and [SN]. The record source is Table_1. There is also a subform that has fields [RER] and [SN]. The record source is Query_1. Query_1 is a Select Query from Table_1. subform is linked to parentform on the SN field. I have a macro On Current event of...
  5. T

    Using wildcards in the middle of a file location

    Hi All, I am trying to open a workbook that will be in a location that is dependent on what the user defines via input boxes: Dim assy As String Dim job As String assy = InputBox("Please enter assembly number in the format Dxxxx-xxx", "Assembly Number") ' i.e. D2270-502 job =...
  6. T

    Issues with toggle buttons on form

    Hi All, I have a form with numerous toggle buttons on. When first loading the form nothing happens when clicking the toggle buttons. Hovering over changes the colour and they aren't grayed out to indicate they aren't enabled. However when I open design view (I CHANGE NOTHING) then go back into...
  7. T

    Filtering subform records

    Hi All, I am looking to filter my subform records. Maybe. I have two fields: RER Number Serial Number My subform shows the RER Number of all the records in which that Serial Number has been entered before. However it shows the current parent RER Number also. I tried applying a filter to the...
  8. T

    InputBox value auto formatting when entered into query criteria

    Hi, So I have a field in a table that will actually store numbers. I have had to make it text field as a serial numbers will be formatted as 1234/9876 which wouldn't work in a number field. Other serial numbers may also be formatted as 5 or 6 digits without any other characters. The code is...
  9. T

    Blocking fields from being updated unless other fields have been entered first

    Hi, Is there a way I can keep the focus on the current control if an If statement is false? But if true move to another field? I currently have: Private Sub TestStage_AfterUpdate() If Unit_Type <> "SP2240" And TestStage = "ESSPASS" And PreESS_FTP = "NO" Then MsgBox "My text"...
  10. T

    Run-time Error '13': Type mismatch

    Hi all again! I am writing what I thought was a simple bit of VBA but have become stuck. I am getting this error on the line: If Unit_Type = "SP2240" Or "SP2241" Or "SP2242" Or "SP2270" Or "SP2271" Or "SP2280" Then The rest of the code is just simple: PreESS_Tested.Visible = False I feel...
  11. T

    Defining how many times to loop.

    I'm not at all familiar with looping in VBA so I may need to waffle... I am looking to create a form that, when opened, asks for a "Date", "Quantity" and "Serial number(s)" all in separate input boxes preferably. How do I accomplish this so that the number of input boxes that appear for "Serial...
  12. T

    Duplicates

    Hi All, Is there a way of allowing some duplicates through in column A but only if column B equals a certain value? I would define the value(s) in column B and this would allow any entry into column A any number of times. Otherwise duplicates are not allowed in A. Thanks.
  13. T

    Creating multiple records from a specified range

    Hi all, I am trying to make it possible to create a certain number of records where one of the fields is equal to all values in between a specified range. So I have fields A, B and C. I want to specify the range for A (Something in the format of 7290/0001 to 7290/0200). The first four number...
  14. T

    Dlookup

    Hi all, I want to look up the value of [A] and return all values of [B] that has that value of [A] against it. However I don't want to define the value of [A] myself each time. I want it to look the value up from existing records and each time I add a new one then display them in a...
  15. T

    Toggle Button

    Hi All, I have a toggle button that when clicked will make a sub report appear and when clicked again would make it disappear again. I have tried to do this by assigning a macro to the OnClick to SetProperty visible of Courses_R to True. I then assumed that clicking the toggle button again...
  16. T

    Expression builder in query.

    Hi All, I am trying to combine two fields into one [RER_Number] from a table in a query using a calulated field and using the expression builder to do so. I want to combine [RER] and [RER Suffix] but only if [RER Suffix] is not blank and does not equal 0. If [RER Suffix] is blank or does equal...
  17. T

    Dlookup function in vba

    Hi All, I am trying to add a Field [Previous_Returns] that looks up the value of Field [Serial_Number] to see if it has been entered before. If it has been entered before then [Previous_Returns] should equal [RER_Number] of the previous entry/entries of [Serial_Number]. If it has not been...
  18. T

    Seeing all queries that include a certain field

    Hi all, I am trying to make some adjustments to an existing database that a previous employee created. There are quite a number of queries in which one particular field "Part_Number" from the table "GRAAN_Data" is called up. I have added another field "Part_Number_2" to the same table. All...
  19. T

    Make a text box appear on some records but not all.

    Hi all, I am self taught on Access so I apologise if the answer is simple. I do feel like there is something simple I am overlooking. I am trying to add more part numbers for one particular supplier (account_ref). This is the only supplier (ARB20) I may require more than one part number on...
  20. T

    Hi

    Hi, I need help on this stuff.
Top Bottom