Search results

  1. D

    Combo box related problems!!

    hahah yup that did it! i cant believe i didnt know how to fix that problem!! thanks a ton
  2. D

    Combo box related problems!!

    i should mention that i just tried it like this and it works fine, but the dates are jammed together without a space or anything... Private Sub CruiseDateID_Enter() Dim S As String S = "SELECT CruiseDates.CruiseDateID, CruiseDates.[EmbarkDate] & CruiseDates.[DisembarkDate] As Dates FROM...
  3. D

    Combo box related problems!!

    In my above post, that is exactly what i have done. The second code box there is what i had in the on_enter for the combo box. as you can see i have it reference a control on the main form but it can just as well be on the subform itself, as i have done below. that is no problem, but it is not...
  4. D

    Combo box related problems!!

    ya that was not very clear, youre right... Here is the SQL that worked well for me when i changed it in the RowSource property of the combo box... but i need to limit the rowsource and i cannot get a dynamic WHERE to work in that query editor. The idea is kind of like once you click a country...
  5. D

    Combo box related problems!!

    Craig, I lied, my problem now is that i am trying to incorporate this into a rowsrouce that changes... The rowsource is located in a subform and needs a WHERE clause that limits the rowsource based on the ID of the main form. Is there a way i can code this in VBA as an on enter event for the...
  6. D

    Combo box related problems!!

    NICE! Craig thanks a lot, i appreciate that
  7. D

    Combo box related problems!!

    Bob, regarding your response, my question is this... I have a combo box with two columns in the row source, they are 2 dates. The combobox is looking up an ID field but displaying these dates in the row source related to that ID. After i select a set of dates in this combox box, only the left...
  8. D

    Outer Join creating duplicates in dynamic query search results

    Problem Solved Well, after hours of ugliness, I have figured out the problem, so if anyone is interested in the code I will post it below: Private Sub cmdHotels_Search_Click() Dim db As Database Dim QD As QueryDef Dim where As Variant Dim fields As Variant Set db = CurrentDb() ' Delete the...
  9. D

    Outer Join creating duplicates in dynamic query search results

    yes your first question is right.. Private Sub cmdHotels_Search_Click() Dim db As Database Dim QD As QueryDef Dim where As Variant Set db = CurrentDb() ' Delete the existing dynamic query; trap the error if the query does ' not exist. On Error Resume Next db.QueryDefs.Delete...
  10. D

    Outer Join creating duplicates in dynamic query search results

    So I am seeing after more searching that a lot of people have posted with this same problem and not a single one has really been resolved. So i hope you all may have some ideas... this comes close but doesnt get me there...
  11. D

    Outer Join creating duplicates in dynamic query search results

    Outer Join and duplicates Now that i have read this again, i think it could be summed up into one question...if i have a form based off a query with an outer join that has various duplicate records, is there a way to use the recordset in an if statement that says something like if this recordID...
  12. D

    Code to avoid overlapping date entries in Products/Rates tables

    The error was # 3270. In the meantime I have just trapped the error as everything is working as it should be other than the annoying popup, but if anyone has any idea why I may be getting this error, i would love to know! Thanks, Dillon
  13. D

    Code to avoid overlapping date entries in Products/Rates tables

    Thanks Ted, good call, everything works well, but I am running into one issue: Private Sub RateStartDate_BeforeUpdate(Cancel As Integer) Set db = CurrentDb() Set rstProductRates = db.OpenRecordset("ProductRates", dbOpenDynaset) rstProductRates.MoveFirst Do Until rstProductRates.EOF...
  14. D

    Code to avoid overlapping date entries in Products/Rates tables

    Hello All, So right to it...I have a Products table with a 1 to Many relationship with a ProductRates table. PRODUCTS ProductID etc. PRODUCTRATES ID ProductID RateStartDate RateEndDate NetRate The above are the fields that matter for each table. I am stuck on figuring out a way to write an...
  15. D

    Experts help! Search form, but tougher!

    The code, which you may remember well, is just taking in any information that the user enters in a search form, such as last name, first name, etc. As long as the user has added something to the search form, a statement that is called "where" is created with each criteria. The last part of the...
  16. D

    Experts help! Search form, but tougher!

    Here is the latest code for one of these searches (no dates on this one!) Option Compare Database Private Sub cmdEmployees_Search_Click() Dim db As Database Dim QD As QueryDef Dim where As Variant Set db = CurrentDb() ' Delete the existing dynamic query; trap the error if the query does '...
  17. D

    onClick Event - Search Using Dynamic Query

    Ya I definitely agree, pretty weird, I am still a little confused about it, but now I know, so thanks for the instruction! d
  18. D

    onClick Event - Search Using Dynamic Query

    Yes, that indeed solved the problem! Thanks a lot!! However, instead of formatting both the record field and the search field like this: ... If Not IsNull(Me![ReturnEndDateSearchText]) Then where = where & " AND Format([ReturnDate],"m/d/yyyy") between #" &...
  19. D

    onClick Event - Search Using Dynamic Query

    Ok great, thanks very much, I will look into that some more. Much appreciated!
  20. D

    onClick Event - Search Using Dynamic Query

    How would I go about doing this? Do you mean change to the non-US date format, because I do not want US format, I want the other, not sure if it has a name..rest-of-the-world format. And thanks for the tip, I will change the +'s. Appreciate your help, Dillon
Top Bottom