Search results

  1. M

    estimate user registration date by earliest transaction

    The below might suffice: SELECT Users.UserName, Min(Transactions.TransactionDate) INTO NewTable FROM Users INNER JOIN Transactions ON Users.UserName=Transactions.UserName GROUP BY Users.UserName HAVING Min(Transactions.TransactionDate) Between [1st date] AND [2nd Date]
  2. M

    Simple text conversion question (quiz related)

    Haven't tested it, but this might work: Dim mystring As String Dim intcounter As Integer Dim char As String For intcounter = 1 To Len(Me.textentry) char = Mid$(Me.textentry, intcounter, 1) Select Case char Case "a" To "z" char = Chr$(Asc("z") - (Asc(char) - Asc("a")))...
  3. M

    VBA Error No value given for one or more required parameters

    You've spelt Transfered wrong ? It should be Transferred - or at least it is further down in the code.
  4. M

    Recordset transactions not completing, no error message!

    It really depends on what you are trying to do - at the moment what it is actually doing seems very bizarre, and I'm not surprised it doesn't do anything at all. First of all, it seems you are trying to edit the 1st record in a recordset - is this the intention ? Or do you really mean to add a...
  5. M

    Adjusting Column Widths

    You can read and set the column width of a field in a table using the following property value in a sub or function: CurrentDb.TableDefs("tablename").Fields("fieldname").Properties("ColumnWidth").value However there is no AutoSize method - you would need to know the widths you want in advance...
  6. M

    Query Caching / Speed up same query run multiple times?

    Try: Set combo_cat1.Recordset = MyRec
  7. M

    query to split 1 column and sort

    You need two calculated columns containing some vb functions: Street: Mid([Address],instr(1,[Address]," ")+1) StreetNumber: Val([Address]) Then sort on these.
  8. M

    TableDef Question

    If you really want to, you need to use the ADOX Catalog to access the table properties. The following should give enough of a clue: http://support.microsoft.com/kb/240222 http://msdn.microsoft.com/en-us/library/aa140022(office.10).aspx
  9. M

    inner join on multiple tables

    Query design, add the 3 tables, join table1 date to table2 date, join table2 date to table3 date, select table1 date, flow1, flow2, flow3. Doesn't this work ?
  10. M

    Query Caching / Speed up same query run multiple times?

    I would remove the Row source propery from the combo boxes, and run the query in Form_Open using a dao or ado recordset then set the Recordset property of each of the combo boxes to this single recordset.
  11. M

    TableDef Question

    The "old" way should still work. Why change it ?
  12. M

    Help identifying Duplicates

    SELECT ID, Count(ID) FROM Mthly_Proposal GROUP BY ID HAVING Count(ID)>0 This will list duplicate ID's if this is what you are really trying to do.
  13. M

    Function to Link to a Database -- SQL from Access

    If the Macro Action is "RunCode", and the "Function Name" is ReLinkDB (), and Public Function ReLinkDB exists (module has been saved), then it should work. The data from the Immediate windows tells me that table 2 is a linked table called CRPDTA_F4100, so likely the the table that it couldn't...
  14. M

    Update/Insert Record

    If you set the recordset property of the form at run time to an ADO recordset object, declared WithEvents, you can use one of the associated ADO events of this recordset, such as RecordChangeComplete as a central place to pick up the changes, and record them. eg: Public WithEvents rs As...
  15. M

    Function to Link to a Database -- SQL from Access

    Re the macro error, just tried it myself, and you do need a function, not a sub, and it needs to be followed by (). The "..." button will find it. The table name needs to be as it is in Access, not SQL Server - and these usually default to being named starting with "dbo_" - if you are using a...
  16. M

    Function to Link to a Database -- SQL from Access

    Access is capable of storing authentication details for a linked table, so it depends on whether you provided the information when you did the link, and got access to remember it. As for the Macro error, either access is being fussy by requiring the "function" to be fully qualified with the...
  17. M

    Grouping Data to Export to Excel

    Forget about re-inventing the wheel by using arrays, you just need to write a query, linking these two tables together, selecting the required fields, and sorting appropriately (by date and Department at least). Grouping by date could be tricky - you might need to add a insert a calculated...
  18. M

    Function to Link to a Database -- SQL from Access

    The error is because you cannot "call" a module as such, you need to be calling a Function or Subroutine within a module. Wrap Public Sub ReLinkDB ..... End Sub around the code, you won't get the error. Having said that, this isn't the way to resolve your password problem, as the connection...
  19. M

    Fill datasheet/Continuous form with vba code only

    How did the data get into an array in the first place? Anyway, I think you could use a listbox, and populate it with the data (using AddItem to add a row, and ; to separate the column data). You'd have to set the ColumnCount property at runtime.
Back
Top Bottom