Search:

Type: Posts; User: stumac; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thread: Access Query

    by stumac
    Replies
    3
    Views
    125

    Re: Access Query

    Looks like you are building a query string then just ignoring it and asking for the table to be returned:


    rsQuery.Open "SageData", cnConnection, adOpenKeyset, adLockOptimistic

    try:
    ...
  2. Re: Access VBA: Create 2D Array, and Then Update Table With Array Data

    Is there a carriage return at the end of the rows you could use to split on before splitting on the pipe? Alternatively if it is always 3 fields then you could just fill the table one row at a time....
  3. Re: Combine different lines to display beside each other

    You were/are in an access forum. JLGWhiz, perhaps you picked this up from the Zero replies which includes posts from all of the forums on this board?

    Tcurtis: I am struggling to work out the...
  4. Re: DMin function on an Access 2016 form to find lowest value in multiple controls

    Here is a function to get the min value, enter it in a module:


    Function GetMin(ParamArray Numbers()) As Variant
    If UBound(Numbers) < 0 Then Exit Function
    Dim x As Variant
    GetMin = Numbers(0)...
  5. Re: SQL to multiply value from previous record ? How ?

    I think the issue is that the OP wants/needs to use access and was hoping to translate or convert logic used by MSSQL into SQL for access. As you note Access doesn't support CTE although some...
  6. Re: SQL to multiply value from previous record ? How ?

    If you really want to do it in access do what Joe says in post 4 and use vba to enter the data into a new table every time you run it.

    The issue with the SQL above even if you can translate it to...
  7. Replies
    6
    Views
    414

    Re: Name Query Not Working

    Glad you got the answer.

    Are you using access pre-2007? The TempVars way of doing this is basically the same thing except does not require a function to get the variable or for the variable to...
  8. Replies
    6
    Views
    414

    Re: Name Query Not Working

    Apart from the typos - how is your query supposed to get your variable? One is inside a routine the function doesn't know where to find that.

    Try using TempVars:


    Do Until myRST.EOF...
  9. Replies
    1
    Views
    360

    Re: Reference another field using VBA

    If it is in the form you are clicking the button on then:


    .Subject = pwd1 & " " & me.description


    Should return the description value of the current record being displayed on the form.

    If...
  10. Re: Changing Values of Text Box on Main Form from Sub Form

    the write conflict is probably because you are saving the record after updating it with code instead of before.

    try saving it first:


    Private Sub cmbSubCombo_AfterUpdate()
    If...
  11. Thread: Appl. slow

    by stumac
    Replies
    2
    Views
    319

    Re: Appl. slow

    Do all 3 computers have Access installed?

    You should split the application in to |Front End and back End, each user should have their own copy of the front end stored locally on their machine. ...
  12. Re: INSERT INTO SELECT * FROM tblName IN 'Db Location'

    use a copy of the database and delete the field.
  13. Re: Running an update query via VBA, execute command can't find the update query

    Sounds like an issue with the underlying query. Does it run if you open it manually?

    Maybe post the SQL and we can take a look.
  14. Replies
    2
    Views
    501

    Re: Column info as new colunm names

    This is not how you should do this at all. It totally goes against normalisation rules and is extremely inefficient. Getting any meaningful reporting from it would become impossible as the data...
  15. Re: Access Query Expression Builder Concatenate IIF syntax, formula help?

    Had a thought - if you are still looking at updates on this... one way to get the result without the trailing ";" (only evaluating each IIF once) within an expression would be to use a double space...
  16. Re: Running an update query via VBA, execute command can't find the update query

    You are referring to cstrUpdate_1 if this the query name then it should be a string: "cstrUpdate_1"

    This way is my preferred method too, if running in a loop it can be much quicker and also (like...
  17. Re: Access Query Expression Builder Concatenate IIF syntax, formula help?

    It can be done as a single expression - the issue with the trailing ";" will still be there (you could still remove it but would need to evaluate each criteria twice - i.e. once to check if the...
  18. Re: Emailing Multiple attachments with VBA code

    Just add in more
    .Attachments.Add lines under the current one in your code. You can either add new variables to hold the file path or just reference it direct


    .Attachments.Add ...
  19. Re: Expression builder syntax, if not null then...

    What about using Between:


    IIf([START_Date_VALUE]+[END_Date_VALUE] Is Null,"",IIf([eBird_ALL_DATA Query2 Base Data Output].[Day-Month_Value] Between [eBird_ALL_DATA Query2 Base Data...
  20. Re: Expression builder syntax, if not null then...

    This should work, however, normally you would enter it as [QueryName].[FieldName]. If you query contains only one table or query or the field names withing them are not the same then you don't...
  21. Re: Expression builder syntax, if not null then...

    - What about Leap years?

    I think this sounds way more complex than using dates for comparisons.

    To answer your original question:


    IIf([DAY-MONTH_VALUE]+[START_Date_VALUE]+[END_Date_VALUE]...
  22. Replies
    8
    Views
    760

    Re: Multiple Update Query in Access

    Not really sure about the easiest way with a macro - I think just use the open query command 4 times and point to your query (might want to set warnings off & back on to stop the prompts).

    code...
  23. Re: VBA script not writing to field as expected

    Also replace:


    rst.FirstName.Value = firstName

    with

    rst!FirstName = firstName
  24. Re: Import Specification -- Cannot Find??? I'm sure it's there!

    Are you sure you have the correct spec name? Check by running this query:


    SELECT SpecName, Count(FieldName) AS Fields FROM MSysIMEXColumns INNER JOIN MSysIMEXSpecs ON MSysIMEXSpecs.SpecID =...
  25. Replies
    8
    Views
    760

    Re: Multiple Update Query in Access

    I agree with the others here that it would be better to run the 4 queries in sequence, however, I think you probably could combine them in one query albeit a somewhat inefficient query:



    UPDATE...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4