Search results

  1. jleach

    Run-time error '3075' when using DoCmd.OpenForm in VBA

    Try putting square brackets around the fieldname (I'm wary of fields that start with numbers...) Private Sub cmdGebruikerBewerken_Click() DoCmd.OpenForm "frm200GroepWijzigen", , , "[200GroepPK] = " & Me.txt200GroepPK End Sub The square brackets are a band-aid for improper field names...
  2. jleach

    Gantt Chart Woes

    Peter's work is always top notch.
  3. jleach

    Error when importing excel

    Try setting up an import specification for this. As part of the import wizard, you can specify the details of each field. You can also try saving the Excel report as CSV and using schema.ini to specify the format. With that said, I've always had trouble with this type of stuff and ultimately...
  4. jleach

    Question Strange TextBox Behavior

    Typically the BeforeUpdate event is used to validate, although Change is nice for more immediate stuff, but still the control's BeforeUpdate would be the final test. I'll verify the bug amd can send it directly to the Access team. Cheers
  5. jleach

    Question Strange TextBox Behavior

    Just out of curiosity, why not use the AfterUpdate event? I wouldn't imagine you're editing treeview nodes based on the specific characters in the textbox, but rather after they've committed the value?
  6. jleach

    Question Strange TextBox Behavior

    Sounds strange indeed. Not sure why that behavior. Can you use the control's Undo event to manage this? https://msdn.microsoft.com/en-us/VBA/Access-VBA/articles/textbox-undo-event-access
  7. jleach

    Top n query using a parameter passed from a form

    I think you'd want to build the query via VBA and open the recordset accordingly. Something like this: Const SQL_TEMPLATE = "SELECT TOP [[Amount]] ... (rest of your query) ...;" Dim sql As String sql = Replace(SQL_TEMPLATE, "[[Amount]]", Me!TopAmount.Value) Me.SomeDisplay.Recordsource = sql...
  8. jleach

    Improving update query

    Can you post the SQL of the update query? That'd give us a much better idea of what might be done to help.
  9. jleach

    How to check whether a table exiists

    Function TableExists(TableName As String) As Boolean On Error Resume Next Dim x As String x = CurrentDb.TableDefs(TableName).Name TableExists = Not CBool(Err.Number) End Function
  10. jleach

    Assigning a Null value to a Control

    I actually just ran a quick test on this. Create a form with a textbox (let's be creative and call it Text0) and a button. Put some code in the button click: Private Sub Command2_Click() If TypeOf Me.Text0 Is Access.Control Then Debug.Print "VBA says it's a control" If TypeOf...
  11. jleach

    Assigning a Null value to a Control

    Not quite sure I'd agree with that... you end up with a reference to an object whether you go about it from the Expression Service or via the VBA syntax. Both paths lead to the same road. In this case, the Bang operator is being applied to the left operand, accessing the default method (the...
  12. jleach

    sum the total from a count query

    Try: SELECT SUM(a.CountOfORDERING_INST_NAME) AS TotalCount FROM ( your existing subquery here ) AS a (after all, you want the sum of that column, rather than the count of records returned)
  13. jleach

    Assigning a Null value to a Control

    Try using the explicit .Value property of the control: Forms![Invoice Payments]![PayAmt].Value = null When you use [PayAmt] without specifying the .Value property, you're actually referring to the control object itself (and all of it's properties, such as .Value, Top, Left etc). Access...
  14. jleach

    Declaring adn defininf public variables

    Curious why you say that. Public and private methods and properties have as much use in class modules as they do anywhere else: 'Book class Option Explicit Private mPageCount As Integer Private mCurrentPage As Integer 'readonly with internal validation Public Property Get CurrentPage() As...
  15. jleach

    Visual Studio 2017 Community unable to read Access .accdb files

    Apparently this installs the PIAs: https://msdn.microsoft.com/en-us/library/15s06t57.aspx (I didn't read through the link enough to know what that means in practical terms).
  16. jleach

    How to post an image?

    Thanks all - I'd hope I can figure out it from here...
  17. jleach

    How to post an image?

    Sorry, but I'm not following. I don't see a GO ADVANCED (even searched for 'advanced' in the post screen and found nothing), and I didn't find a relevant button under Manage Attachments. I did find the paperclip down arrow and selected from there, which put it in an ATTACH tag instead of an...
  18. jleach

    How to post an image?

    Is there some trick to posting an image in threads? I've tried the Picture button from the toolbar, which asks me for a URL (I upload to imgur and enter the url, but the image doesn't display), or I can do an attachments, which just shows up as a link to the file rather than embedding the...
  19. jleach

    Problem with Insert Statement strSQL = "INSERT INTO

    Print it out then throw it into Notepad++ and use Poor-Man's T-SQL Formatter to make it readable!
  20. jleach

    Automating Order Retrieval from Website

    sxschech - you should take a look at iMacros. It's very similar (at least in this feature) to autohotkeys, but has far better support for web (such as waiting until the page is loaded before moving on to the next step, etc). There's a nice bit of programmability to it as well. You can record...
Back
Top Bottom