Search results

  1. B

    Data Type mismatch error

    I think that's a job for double quote marks. Try: """" & BuyerLastName & """"
  2. B

    Sending text to Excel cell - Carriage returns disappear!

    Sorry. I was trying to be helpful, and quickly wrote some example code, doing exactly what I'm trying not to do. I simplified it so much I got rid of the string. Too much happening. Let's try: Str = "Some text" & vbCr & "Some more text" xlRange = Str 'AND Str = "Some text" & vbCrLf & "Some...
  3. B

    Sending text to Excel cell - Carriage returns disappear!

    I'm trying to send strings from Access vba to excel. Some of the strings have multiple lines. I've tried using vbCr, vbCrLf, and Chr(13) & Chr(10), but all of these end up with nothing between them in Excel, all on a single line. To clarify, I'm building the string, and then sending it to the...
  4. B

    Save an Excel.xlsm as Excel.xlsx

    I think you may need to specify the file type explicitly when calling saveas. https://msdn.microsoft.com/en-us/library/office/ff198017.aspx You might need to chop off the existing file extension, then use: excelApp.ActiveWorkbook.SaveAs strTarget2File, 51
  5. B

    Object reference Libraries

    It's looking distinctly like late binding is the way forwards. It's not as tricky as RuralGuy's link made it look. You need to dim a generic "object" for each excel object (i.e. workbook, worksheets, including excel itself) you need, and then set them with a create object line. It's described...
  6. B

    Object reference Libraries

    I have no experience of 365, so all I can suggest is to open up Access on the PCs that aren't working, and check what version of the Excel Reference Library is available in the list.
  7. B

    Save an Excel.xlsm as Excel.xlsx

    Any code on how you're trying to save it as xlsx? It's hard to guess what's wrong without that. What happens when the macro doesn't let you save as?
  8. B

    Object reference Libraries

    Just to clarify, is everyone using the same version of Excel? As far as I can tell, you've specified that everyone has Access 2013, but not whether that's the same as the rest of Office.
  9. B

    How to have variable sized word reports

    Hmm, thanks, that's a very interesting thought. I wonder if maybe using tables and having all the desired content inside (even if it's huge) would be the simplest way of navigating/building. Will investigate further.
  10. B

    Access Application Icon in the Windows 10 taskbar

    I don't suppose anyone's found a workaround that doesn't force the user to change how they set up their taskbar?
  11. B

    How to have variable sized word reports

    So, I have been tasked with generating reports in Word if possible. There are multiple reasons for this, but primarily they are the need to a) have equations and various nice looking things in the report, b) be built by non-access people for me to then set up the database connections with...
  12. B

    Query not updateable, can't see why.

    I had assumed that was what filter was for, but I'd tried, and it just dumped the whole table into the subform. I must've had an error in my syntax or something.
  13. B

    Query not updateable, can't see why.

    Update: I have fixed it I un-indexed "Fluid_ID" in "Mol_fractions". The query then worked. I don't know if that was down to arnelgp's rearrangement as well, but it's working so I'm not going to find out. plog: I would still be very interested to understand what you mean by not using queries...
  14. B

    Query not updateable, can't see why.

    I feel I am missing something here. How can I have a subform that only shows selected records from a table without using a query? This didn't quite work, so I fixed it. I assume it maintains your intentions: SELECT Mol_Fraction.* FROM Mol_Fraction LEFT JOIN Fluids ON Mol_Fraction.Fluid_ID =...
  15. B

    Query not updateable, can't see why.

    I know this is a very common question, so of course I have come across the list of reasons this could be happening: http://allenbrowne.com/ser-61.html The setup is fairly straightforward. I have two tables, "Calc" and "Mol_fraction". There is a field in both called "Fluid_ID". The values of...
  16. B

    Sum updating late in a continuous subform

    Thanks, I'll definitely file that one away for future use. As it is, I simply called up the recordset and summed it separately in VBA to write to the main form.
  17. B

    Sum updating late in a continuous subform

    The trouble is, I need it to update the back-end. If a user updates a control on the subform, then clicks save on the main form, I need it to update the table, recalculate the Total_K_for_type (which is in the back-end), then sum the subform, before writing that to K_all. I think I'll just...
  18. B

    Sum updating late in a continuous subform

    I have a subform with a textbox (Total_K_for_pipe) whose control source is =Sum([Total_K_for_type]) (don't ask me, I didn't name these things) Total_K_for_type is a calculated field in the back end, based on two other inputs on the same subform. I have set it up so that AfterUpdate for either...
  19. B

    Go through a form's recordset without affecting the form

    RecordsetClone seems to have done the job perfectly. Thanks all.
  20. B

    Go through a form's recordset without affecting the form

    I've got a continuous form, on which I need to use an OnCurrent event to check that the first record has a certain value. So I have an OnCurrent sub like so: Private Sub Form_Current() Dim FormRst As Recordset FormRst.MoveFirst ' Code to check that the first item is as expected However, the...
Back
Top Bottom