Recent content by why

  1. W

    Hiding Combobox or txt box depending on if data is null

    Thank you, you are right some of the code is pretty sloppy. It is a work in progress for now I switch to some higher priority parts of the project and will come back to this. Thanks for your help
  2. W

    Hiding Combobox or txt box depending on if data is null

    No worries I should have. Thanks for your help
  3. W

    Hiding Combobox or txt box depending on if data is null

    Is getting the same error.(I think this is why) There will be a lot of these clients/matters where the record does not exist in this query. So how can I check to see if the record exists and if not then make the txtbox visible and hide the combobox. Or is there a better way to do this?
  4. W

    Hiding Combobox or txt box depending on if data is null

    Thanks for your help. This fixed the syntax errors. Your right I need to check if the record exists first and that is what I was trying to do with this. What would be a method to check if the closed number exists for that client matter? If I put a client matter that does not have a closed...
  5. W

    Hiding Combobox or txt box depending on if data is null

    I am trying to display a txtbox if data is null and Display the combobox with the data if it has data. I am getting an run-time error '3021' No current record on If rs!Closed_Numbers Like "" Then Thanks for all the help. Here is my code Private Sub cmbMatter_AfterUpdate() Dim strSQL As...
  6. W

    Trouble with Select statement in Loop

    Thank you so much, the single quotes worked. When you have time can you explain it? Once again thank you
  7. W

    Trouble with Select statement in Loop

    Thank you can you give me a clue on how to do it? I have changed the declaration to strings. That did not seem to help
  8. W

    Trouble with Select statement in Loop

    Ok I am making progress but could use a little help Dim year As String Dim Closed_File As Integer Dim Closednumfinal As String Do year = rs2!years Closed_File = Closed_File + 1 Closednumfinal = year & "-" & Format([Closed_File], "0000") db.Execute "INSERT INTO...
  9. W

    Trouble with Select statement in Loop

    Thanks but apparently you can't do a db.execute with a select query. I will modify it and try again.
  10. W

    Trouble with Select statement in Loop

    Thanks, I will look at it again I have been making changes trying to get it to work.
  11. W

    Trouble with Select statement in Loop

    Thanks for the help!! I changed the code to this while testing. Do Closed_File = Closed_File + 1 ' db.Execute "INSERT INTO Closed_File_Numbers(ClosedNumbers)" & _ db.Execute "SELECT Format(Date(),""yy"") & " - " & Format([Closed_File],""0000"") AS test;" Loop While Closed_File...
  12. W

    Trouble with Select statement in Loop

    I agree however this data is coming from a third party system So I have to deal with what I get.
  13. W

    Trouble with Select statement in Loop

    Good Morning! I am trying to add sequential numbers to a table. If it does not exceed a number another table. I am having trouble with the insert portion. this code works in a normal query in the access query gui. SELECT Format(Date(),"yy") & "-" & Format([Closed_File],"0000") AS test; I...
  14. W

    Solved DatePart not working in select query like

    Thanks the first one worked here is the code SELECT Max(Val(Right([ClosedNumbers]![ClosedNumbers],4))) AS Expr2 FROM Closednumbers WHERE (Left([ClosedNumbers]![ClosedNumbers],2))=Format(Date(),"yy");
Top Bottom