Search results

  1. K

    Using continuous forms instead of creating controls:)

    Hi guys. First of all, thanks to MajP, isladogs, pat Hartmann, GPGeorge, Arnelgp , and anyone I might have forgotten for the discussion on not misusing ms Access by creating controls dynamically, and for the advice and discussion on the topic. It was merely out of laziness that I didn't want...
  2. K

    Solved linking text box with after_update procedure using VBA.

    Hi, I've got a form where I dynamically create a text field using Set ctl= CreateControl(...,acTextbox,...) Now, in the form, I have written an after update function, which I need to be linked somehow to the created control. How do I do that with VBA. I know normally, one would go on the text...
  3. K

    Solved Large cte problems

    Hi, I'm reading in a long CTE SQL via text file, and replacing a few parameters via VBA-Code. When I try to look at the final SQL in the immediate window, I only get to see the bottom half of the statement. How can I see all of it?
  4. K

    Solved Schema setting for passthrough query

    Hi, I thought if I have a passthrough query and the query is written without a schema, I could add.. SET SCHEMA "XXX" Before the query, but it doesn't work. I guess the syntax is DB2, and that I need the access syntax.. Any ideas anyone? Thanks in advance, Kingz
  5. K

    VBA - change column name function

    Hi, I wrote this little function as part of an ETL procedure. It's simply to help me change column names in my access table, in VBA.. Public Sub change_col_name(TableName As String, OldColName As String, NewColName As String) Dim tblDef As TableDef Dim fldDef As Field Set...
  6. K

    Import csv to excel to access table

    Hi, When I normally manually import a CSV file, I tend to convert it to xlsx first and then import, because I get no import errors this way. Now I'm trying to do this dynamically, and it works syntactically, but I want it to skip 12 lines and my delimiter is semicolon.. These two factors are...
  7. K

    Setting ODBC in VBA Code

    Hi, I have a few Passthrough queries, which function via an odbc connection. With VBA, I have a form where I can update the queries using query Defs. What I've noticed, is that when I start the program fresh, it will give me an ODBC error, however, if I go to my queries and execute one by...
  8. K

    Solved Dynamic Insert statement

    I have a function whereby I am trying to create an insert into statement by saving the column names from a select and using that output to write the insert into. So I try to create a 2- dimensional array filling the first slot with the areas (651,652 and 801) and the 2nd slot with the column...
  9. K

    Solved Search comboBox on a bounded form

    Hi guys, I have a form with a recordsource SELECT * FROM TABLE_A WHERE BRANCHES ='OPEN' This form has several textfields and combo boxes which are bound. I have one combo box cboName bound on the form, which I would like to use as a search field, in the sense that if I type a few letters in...
  10. K

    Dynamic default of text field possible?

    A user of my form would like a default date appearing in a text field of the form. This default is to be the last date used on that field.. Is it possible to store this date in the default property. I realise the user would need to save the application at that point, in order for it to remain..I...
  11. K

    Solved Save button on bounded Form

    Hi, I have a bounded Form with a tab and several text fields and combo boxes. Now, I only want it to save my input into the fields, when I press the save button, and I can set and check a few things along the way. It seems like it, because it's bound, it saves it anyway. How can I control this?
  12. K

    Access 2021 compiled for accde file

    Hi, I thought an accde file, wouldn't give the user access to the tables and queries, but I don't see any difference to the developing file. I remember in the older versions you could create an exe for the user. How close can I get to that? I would like it to start with my form frmMain, and...
  13. K

    Docmd.Transferspreadsheet

    Hi, I was wondering if I could rename an excel export. I'm actually surprised there isn't a "sheetname". I guess I could rename my query table but I don't want to, die to organisational reasons. Here is my statement: StrTable="3_boxphase" Docmd.TransferSpreadsheet Transfertype:=acexport...
  14. K

    Several executes with currentDB possible?

    Hi guys, I was wondering, I have an SQL statement which was dynamically created and which I have stored as such: Set Qds = DBs.querydefs("PT_query") Qds.SQL= strSQLQuery Qds.returnsrecords = True Qds.Close That works fine.. Then I delete the contents of a table: currentDB.Execute "DELETE...
  15. K

    Saveas method with workbook

    Hi guys, I'm trying to simply export data in a recordset to an excel file, which I show in the code. Unfortunately, only a manual entry of the expiry file and path is possible. Here is my code: Set rs= currentDB. Openrecordset("dynamic_query", opensnapshot) Set objxl =...
  16. K

    CTE Passthrough query giving error(3129)

    Hi guys, I've got a complicated CTE query (strQuery) which works as a passthrough query, so I needed to dynamically set some dates in it, and execute it via VBA. I get an error 3129, meaning that it expects, instead of "with", delete, insert, select, or such likes.. Here is the relevant code...
  17. K

    Opentextfile leads to error 5

    Hi guys, I'm trying to access a file which seemingly exists, but gives me an error 5. Here is my code: `Strfilepath="...\query.txt" Set DBs = currentdb() Set fso = CreateObject("Scripting.FilesystemObject") If fso.FileExists(strfilepath) then Set file =...
  18. K

    Pass through queries with parameters in access

    I was wondering, I have quite a complicated query using lag function and stuff. So I need a pass through query to successfully execute it. However, there are a couple of date parameters ( date_from, date_until) which I would like to add to the pass through query. Is that possible? Ideally, I...
  19. K

    Forms always maximised.. Why?

    Hi guys, I am using access 2021, and I'm having problems finding why my forms always open maximised. I've made the forms quite small but when I double click it to start it, it opens screen size. I'm probably blind as to where to correct this.. Thanks in advance
  20. K

    delete tabs from a form

    Hi, I am having problems deleting the tabs of my Tabcontrol in an access form. I have a button on one form, which is supposed to force the deletion of the tabs in another form. My way of doing it seems to cause a problem as I get an error that the form needs to be in design mode to do...
Back
Top Bottom