Search results

  1. S

    Alias in expression

    I fixed it, it was just a matter of writing it [table].[field] so [Retail Info].[Sales Qty] so access would know I want the base field and not the alias of itself. Makes sense really.
  2. S

    Alias in expression

    [Période Mensuelle] is a field, [P_FIN_PERIODE] is a user input parameter and [Sales Qty] is a field
  3. S

    Alias in expression

    Hello, I have a column called [Sales Qty] and recently need to sum it so it becomes [SumOfSales Qty]. That simply won't do because the result is used in macros and such afterwards, so I've done the rather silly but efficient method of aliasing my column with its own name: "Sales Qty: Sales...
  4. S

    Parameter type is wrong

    How would it NOT know? It's a querydef object, saved in the application. It's a query based on a table, it should know all the fields and what type they are. When I start the query manually by double-clicking it, it prompts me for my [parameter], I give it a string and it converts it in whatever...
  5. S

    Parameter type is wrong

    Nope, I can't have parameters in a form because that module handles any query the user creates, it's entirely dynamic. There could be 0 parameters, there could be 100. I also don't want the user to have to list them before starting the module, as that would become a chore. The SQL i manipulate...
  6. S

    Parameter type is wrong

    Hello, I'm making a fairly complex application. At some point, I open a querydef and cycle through its parameters to prompt the user to enter it. Then, according to the type of the parameter, I will put tokens around it (" for string, # for dates, nothing for numbers), and put the parameters...
  7. S

    More than 1 inner join slows query too much

    CJ_London, I'm not using anything special, nor UNION queries (which would be very useful to me but I had to drop early because the results are well over 2gb). The maketable solution works, the 1st query runs ok, makes a table, and the next queries are instant since the table is only a few...
  8. S

    More than 1 inner join slows query too much

    Hello, I have my main linked table VI, and 4 of VI's fields are to be filtered in a query. To do so, I have 4 very very tiny local tables (less than 20 records) called respectively "soff", "skus", "warr" and "typ", in which the user will only put what he wants in the result, and by doing Inner...
  9. S

    Using INNER JOIN makes it slow?

    I think it's because of local network issues. The queries I run are starting to take completely random amounts of time to run, from 1s to 10min, and we did have a network outage yesterday. Sorry for that panic thread, I'll update if it turns out it was not.
  10. S

    Using INNER JOIN makes it slow?

    Hello, I have a very basic query. Table VI has 500k records, primary key is VI.ID, and the field I'm filtering is VI.sku, which has an index. If I do: select count(vi.id), vi.sku from vi where vi.sku="ABCD" group by vi.sku The query runs in less that a second and all is well. However, my...
  11. S

    CurrentDb puts me in locked mode.

    And, typing about it, I realize that indeed my parameters table would sit well in its own database, as it'd allow me to change parameters without needing to redistribute the FE to users, but it's supposed to never change unless I do design change aka adding/modifying modules and forms, so I'll...
  12. S

    CurrentDb puts me in locked mode.

    1. Parameters is a local table 2. I place my parameter table in the FE because the BE is actually 8 BE's and it feels right to put it there. There are also other parameters tables such as "sales area" that will be used in JOINS with the BE tables to pull out some stats, and those need to be...
  13. S

    CurrentDb puts me in locked mode.

    But in my case I use objects that are in the current db (front end), and objects that are in other dbs (back ends). The issue was that I needed different databases to be open at the same time, not just recordsets from the same database. My code was right the whole time, it should have worked...
  14. S

    CurrentDb puts me in locked mode.

    I found the solution, it only took me the entire day. For a reason that I do not know, this whole issue happened because I was creating a pointer to another database with DAO.OpenDatabase, and later on using currentDB. It seem that creating a pointer to currentDB, and then creating a pointer...
  15. S

    CurrentDb puts me in locked mode.

    After investiguation, I found a little more info, the .laccdb file created when I open up the database contains: LFRMO0009498 Admin After I run any line of code using currentDb, it becomes: LFRMO0009498 Admin LFRMO0009498 admin It's not helping me so...
  16. S

    CurrentDb puts me in locked mode.

    rs is supposed to open the table "parametres" that is within the "front end" part. It's just a tiny table with some parameters I need to run my code. yeardb is the database with the actual data, I open it remotely because what I'm coding is the import tool, and I figured it would be faster to...
  17. S

    CurrentDb puts me in locked mode.

    Hello, The second function called by my main sub contains the following line: Set rs = CurrentDb.OpenRecordset("Parametres") If I have changed a piece of code before running it, it raises an error: "The database has been placed in a state by user 'Admin' on machine 'numbers' that prevents...
  18. S

    Last(), the heck is it doing????

    Oh, it "appears" that way to the user, my bad.
  19. S

    Last(), the heck is it doing????

    Yeah, it does. I understand now that the function ignores sort orders and even index/primary key order and takes the last row added. But in my case, it's literally what I'm looking for. The last added status for a request. According to what I read in this article, it should find it. It might...
  20. S

    Access Replace Function

    I don't think you can use replace like that. I would use an IIF function instead: iif([Field1]=0, "No", [Field1])
Back
Top Bottom