Recent content by ijit

  1. I

    Filter a Listbox with text from Textbox

    Alright, I tried this code and it says, Run-Time 13 Type mismatch error. Private Sub txtSearch_AfterUpdate() Debug.Print Dim strSQL As String Dim vText As String vText = Me!txtSearch strSQL = "SELECT tblNavigatorLeads.DotNo, tblNavigatorLeads.LegalName FROM...
  2. I

    Filter a Listbox with text from Textbox

    I have a form with an unbound Listbox that finds a record on a form. When you select the Company Name, the two subforms show the records associated with the selected company name. The listbox contains thousands of companies. I would like to be able to enter text into a textbox that filters the...
  3. I

    Update SQL with variable

    I would like to write an INSERT INTO SQL that contains both a variable and field reference. Something like this: "INSERT INTO Table1 ([Field1],[Field2],[Field3]) SELECT " & Var1 & "([Field2],[Field3] FROM Table2 WHERE [Field4] = n" Is something like this possible?
  4. I

    Data has changed error

    Requerying the form wroked perfectly. I also took out the Response = acDataErrContinue, thanks for the tip.
  5. I

    Data has changed error

    I have a form with a list box in it. I also have a button that deletes a record out of the table depending on whatever is selected in the list box. The issue I am having is when I return to the form after the code has run, and I choose another option in the list box, it says, "The data has...
  6. I

    Syntax Issues

    It worked perfectly, thanks.
  7. I

    Syntax Issues

    Hey, I am still learning the syntax in VB. This is saying that the types don't match up. CurrentDb.Execute "DELETE * FROM ItemList WHERE ([ItemKey]= & Me.ItemKey & )" ItemKey is a number. How would I write this?
  8. I

    Form in datasheet view

    No, it is linked directly to a table.
  9. I

    Form in datasheet view

    Is there a way to make a form in datasheet view reverse direction. So the newest entry is at the top? That way, everytime I load the form the most recent entry is visible and it is ready for a new entry. Right now I have to scroll through all the entries before I get the new one.
  10. I

    Calculate subform text boxes in main form

    I have a main form called OvenCodes. It has a subform called sfrmOven1. I need a control in the main form that calculates an average of 5 fields in the subform. The text boxes in the subform are these: GlossA GlossB GlossC GlossD GlossE I need something like this: =Avg(Forms!sfrmOven1.GlossA...
  11. I

    query the 3rd most recent item from a table

    OK, I'm trying it and it almost works. It is doing something, though, that I am not familiar with. When I click on the first thing in the list it works beutifully. When I click on the second, it lists NAME# erros in the text boxes. When I click on something else after that the name errors won't...
  12. I

    query the 3rd most recent item from a table

    OK, I'm back. Sorry it took me so long. I'm wondering if instead of using a presorted form, I could use a listbox in the parent form and .GoToRecord actions in the subforms. So for example, the main form has a list box in it and I choose the second record in the list box, the subforms all...
  13. I

    query the 3rd most recent item from a table

    Let me make sure I am getting the process right. I would make VB filter the table by the primary key, it would get this primary key from the parent form, then it would sort the table by DateTime (ORDER BY (DESC)), and then it would select record #3. Can you give me an example of this?
  14. I

    query the 3rd most recent item from a table

    Wow, that's the simpliest answer yet. But it would create alot of queries. I have to create 8 of these. One with the 3rd, one with the 4th, one with the 5th... That would give me 16 queries. Would that concern you at all as far taking up alot of memory, or are queries fairly good on memory?
  15. I

    query the 3rd most recent item from a table

    I have a table with a DateTime field. I would like to create a query that queries only the 3rd most recent record in the table. So there would only be one record per ID. If there is only two records for an ID, it would show nothing. I have tried a few things already, but none of them have worked...
Back
Top Bottom