Search results

  1. Cosmos75

    Primary Keys and auto number

    It is a good idea to use an autonumber as your primary key. Your primary key should be unique and most often meaningless. Unless you have a natural key such as a social security number or some other value that is unique to each record. I can't tell from your diagram what your relationships...
  2. Cosmos75

    How can I select only the rows I need?

    You can also do it in one query by using a SQL statement as criteria for you [Rate] field. SELECT Sorter, Lender, Loan, Rate, Price, APR FROM tblData WHERE ((Rate)=(SELECT Min(a.Rate) AS MinOfRate FROM tblData AS a GROUP BY a.Sorter HAVING (a.Sorter= tbldata.Sorter)));
  3. Cosmos75

    how to reference a subform within a subform

    bob, Very nice article! :D
  4. Cosmos75

    Listbox with varying background colors

    Never tried it but maybe this will help? Lebans.com - ListBoxEnhanced
  5. Cosmos75

    Get some values and the inmediatly previous ones based on a date whithin a range...

    Maybe this can help get you started - Previous Date & Sum of Month/Year to-date using a correlated subquery
  6. Cosmos75

    Number Generating Question

    See my sample in this thread. Maybe that will help get you started.
  7. Cosmos75

    combining rows

    Maybe this can help - DConcat function - Concatenating field values for multiple records matching a query's GROUP / SORT BY or WHERE clause
  8. Cosmos75

    Sequential numbers for each customer

    mmitchell, You can do it either way. The way I see it, you have a unique ID for a customer. And for each order (or some other transaction) you want to create a sequential number for for that transaction and tie it back to the customer, so it makes more sense to me to give each transaction a...
  9. Cosmos75

    Sequential numbers for each customer

    Here's a quick sample I whipped up. Not pretty but I hope it helps! :) EDIT: mmitchell beat me to it...
  10. Cosmos75

    Merging info in one field

    I'm happy to share it. While I fully understand that it's much easier to create a custom code for your a particular situation, I like tinkering on generic functions that are reusable. Thanks for the compliment! (especially coming from a guru such as you!) :D
  11. Cosmos75

    Merging info in one field

    Here's another way - DConcat function - Concatenating field values for records matching a query's GROUP / SORT BY or WHERE clause . (old link). The code is a lot longer but it's meant to be a generic function.
  12. Cosmos75

    run-time error 13: type mismatch

    It might have to to do with disambiguation. 'Ambiguous Dim rst As Recordset 'Disambiguated Dim rst As DAO.Recordset Not sure if this is your problem. but if you have both ADO and DAO selected in your references, you need to tell Access which type of recordset you are wanting to use. 'DAO Dim...
  13. Cosmos75

    VBA in query criteria

    Public Function fPropertyName() As String fPropertyName = "Value" End Function Call fPropertyName() from your query
  14. Cosmos75

    Sorting characters within a string

    Try these strings Test String, Result 1) aBabAb, aaAbbB 2) aaAaAaaAA, aaaaaAAAA 3) aaAabAaaAA, aaaaaAAAAb 4) aaAaBAaaAA, BaaaaaAAAA 5) aBCabcAb, BaaAbcCb 6) aAAabBBbAaaA, aaAAAAbBBaab 7) ABCDEFGHIJKLMNOPQRSTUVWXYZijklmnopqrstuvwxyz, ABCDEFGHIJKLMNOPQRSTUVWXYZijklmnopqrstuvwxyz If gets worse...
  15. Cosmos75

    Sorting characters within a string

    Thanks for the vote of confidence but I remembered that a Shell sort is faster than a Bubble sort, so I was tweaking the code to post a newer version but I ran into a problem. It sorts out that sorting characters is more complicated that I initialy thought. See this article - A Better Shell...
  16. Cosmos75

    using a Vlookup and IF together

    Sounds like you are trying to do a Multiple Criteria VLOOKUP.
  17. Cosmos75

    Sorting characters within a string

    mousie, Glad that worked for you. Be sure you remove the following code lines. From SortString() Debug.Print "SortString('" & strString & "') = " & SortString and from BubbleSortString() For lLoop1 = LBound(iArray) To UBound(iArray) Debug.Print "iArray(" & lLoop1 & ") = " &...
  18. Cosmos75

    VB Conditional Formatting

    For your form, see 'Conditional Formatting' of controls in a continuous form For a report you can use the On Format event in the section where you values are. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Select Case Me.txtColor Case "Red" Me.txtColor.ForeColor =...
  19. Cosmos75

    Sorting characters within a string

    The sort code is based on code from a KB article - How To Sort Algorithms for Numeric Arrays. Not sure if there are any issues with using it for strings, so be sure to test it first. Option Compare Database Option Explicit Public Function SortString(strString As String) As String Dim l As...
  20. Cosmos75

    Finding groups of numbers from multiple records

    I am using Access XP/2002. The file is in Access 2000 format. Don't have Access 2007 so I'm not sure if that's the problem. Did a quick search on the MS Office website and it looks like Access 2007 can work with the Access 2000 file format. From...
Back
Top Bottom