Search results

  1. P

    Solved Issue with Null Value

    Changing the data type from String to variant worked.
  2. P

    Solved Issue with Null Value

    Good Information. Thank you
  3. P

    Solved Issue with Null Value

    Thank you so much. I changed the data type from String to variant and it works. I did not know that bit about only variant being able to hold null values. Thanks again. That did it!!!
  4. P

    Solved Issue with Null Value

    Hello all, I have a lot of issue with Null Values. Here is the code Private Sub cboRestaurant_AfterUpdate() Dim strSQL As String strSQL = SelectFromQryCateringsWhere & "WHERE RestaurantName='" & Me.cboRestaurant.Column(0) & "'" Me.txtContactName.Value =...
  5. P

    Solved Auto Refresh Linked Table sourced from Excel

    Oh. I didn't know that. I'll be exploring it today. Thanks so much Guys
  6. P

    Solved Auto Refresh Linked Table sourced from Excel

    Thank you very much Guys. All of these options work great! Quick question. Is there a similar forum for SQL Server and PostgreSQL programming. This MS Access VBA forum has been indispensable to me and I am looking for something similar for the other ones
  7. P

    Solved Auto Refresh Linked Table sourced from Excel

    Got it! This option also works
  8. P

    Solved Auto Refresh Linked Table sourced from Excel

    I just tested this out and it works. I didn't know about the TransferSpreadsheet method and just read about it as well. Thank you for your help
  9. P

    Solved Auto Refresh Linked Table sourced from Excel

    Hello Guys, I want to refresh a linked table sourced from Excel. I found the following code online Public Function RefreshLinks(ByVal sDatabase As String) As Boolean On Error GoTo ErrorOut 'Refresh table links to a backend database Dim dbs As Database Dim tdf As TableDef Dim...
  10. P

    Solved Function returning String not working

    The new code is now Private Sub Form_Load() Dim strSQLLst1 As String ' strSQLLst1 = "SELECT LastOrdered,OrderNo,OrderedBy,SupplyCateg,VendorName,ItemNo,[Brand],[Color],[Size],MaxQt,MinQt " ' strSQLLst1 = strSQLLst1 & "FROM QryTransactions ORDER BY LastOrdered" strSQLLst1 =...
  11. P

    Solved Function returning String not working

    I don't why I forgot about stepping through it. There was a mistake in my function and it caught it. Thank you so much
  12. P

    Solved Function returning String not working

    Hi Guys, My function is not returning anything. what am I doing wrong here? Private Sub Form_Load() Dim strSQLLst1 As String ' strSQLLst1 = "SELECT LastOrdered,OrderNo,OrderedBy,SupplyCateg,VendorName,ItemNo,[Brand],[Color],[Size],MaxQt,MinQt " ' strSQLLst1 = strSQLLst1 & "FROM...
  13. P

    Solved Create a FilePath with Year at the end

    Thank you, I tried that but it not work. The file path reads with literal ???? and not as a wildcard. I've also tried to bring it out of the quote marks but nothing. HOWEVERY, I just used your last suggestion and got a work around for it to work. Here is the final Private Sub...
  14. P

    Solved Create a FilePath with Year at the end

    From #10 - Yes the year is added at the end of the document file name, which is the year the specific document expires. So that year is manually keyed with the file is save so the path is for example "\States\California\SmithJohn2022.pdf" so when I create the filePath, I say match...
  15. P

    Solved Create a FilePath with Year at the end

    Ok I have working on this for hours and finally just used your suggesting. Here is what I have Private Sub cmdCertificate_Click() 'Create the FilePath to look for Dim strFolderPath As String Dim strFilePath As String Dim intYear As Integer 'The Folder resides in the same...
  16. P

    Solved Create a FilePath with Year at the end

    Yes when the file is saved within the folder, it should have be LastnameFirstnameYYYY.pdf so those 4 numbers are already there so I want it to declare a variable whose value is any 4 digits like Dim intY as Integer 'Needs it to be any 4 digits intY = ####
  17. P

    Solved Create a FilePath with Year at the end

    Thank you for this. Does access VBA have a way to declare a variable and tell it to be only 4 digits? I tried Dim intY as Integer 'Needs it to be any 4 digits intY = #### But it is not working....What does Dim intY as Integer = 4 do?
  18. P

    Solved Create a FilePath with Year at the end

    I have a pre-defined function here is the whole thing Private Function FileExists(ByVal path_ As String) As Boolean 'Function to check if a file exist or not FileExists = (Len(Dir(path_)) > 0) End Function Private Sub cboState_AfterUpdate() 'Create the FilePath to look for...
  19. P

    Solved Create a FilePath with Year at the end

    I did but if the document is SmithJohn2022.pdf it does not read it because we are in 2021 so how do I tell it to read any year?
  20. P

    Solved Create a FilePath with Year at the end

    Ok but how can I get my filepath to read SmithJohn2021.pdf if the last 4 characters represent a year. I mean like strFilePath = strFolderPath & "\States\" & Me.cboState.Column(0) & "\" & Me.cboName.Column(2) & Me.cboName.Column(3) & ".pdf" what would come after Me.cboName.Column(3) & if I...
Back
Top Bottom