Recent content by gibsonn

  1. G

    Reloading a subform

    Thanks for replying the requery method worked fine. Just one more thing how can I get the focus to remain on the object I have just changed once I have clicked on a tab/button etc outside of the subform?
  2. G

    Reloading a subform

    Hi all, How do I reload a subform without leaving? Reason being is that I am deleting a record in the after insert event of the form and when I click on another tab/button whatever it comes up with deleted all the way accross. What would be ideal is that when the event is triggered is to...
  3. G

    combo box value in the beforeinsert event

    I think the reason rich's suggestion didn't work is because I am using an update event, so when I update anything it triggers the validation - even when I don't want it to. It does this because I am counting the number of rows in the database and it doesn't realise that is two rows until the...
  4. G

    combo box value in the beforeinsert event

    Thanks for your replies. However, the beforeupdate works ok on the second row of the subform, but when I try and change the first row the validation kicks in again when it shouldn't as this is ok. the beforeinsert event would work if I could somehow capture the value of the combobox when I...
  5. G

    combo box value in the beforeinsert event

    Started off using afterupdate on the combo box, however the dcounts do not work correctly on the second row of a combo box. It still thinks that there is one row in the database and when I use me.refresh the me.undo fails
  6. G

    combo box value in the beforeinsert event

    sorry, read x as meet1 I was messing around with it. even when I put in meet1 in a dim command I am still getting invalid use of null. It's basically not remembering the value in the combo box that I click on. However, it does remeber it when I use afterinsert.
  7. G

    combo box value in the beforeinsert event

    Thanks very much for replying. I still have a problem with the value of the combobox coming back as null when I have clicked on a value, even when I added in your suggestion. The revised code is below. Any help greatly received. Dim stincid As Long Dim lngTotal As Long Dim lngno As Long Dim...
  8. G

    combo box value in the beforeinsert event

    I have a beforeinsert event on a sub form and am trying to do some validation on it. Basically when a user clicks a value on a combo box within the sub form it hits the code below in the beforeinsert event. However, "Meet" (combo box value) is null when I clicked on No. What am I doing...
  9. G

    Synchronised Subforms

    This may work. Have you tried using bookmarks? e.g. dim rs as object Set rs = Me.Recordset.Clone rs.FindFirst "[INC_ID] = " & Str(Me![Combo62]) Me.Bookmark = rs.Bookmark I have this code a form which contains a subform and works on the afterupdate event, you may want to use the...
  10. G

    dcount in subforms

    Better example, I hope Thank you very much for spending the time to reply. I will try and explain again what I am trying to do. The example below is in a continuous subform Example: Has a planning meeting been held? Outcome Yes...
  11. G

    dcount in subforms

    Hi, What I want to do is to validate the user's entry in a subform. Example: If the user puts in yes to a question such as "Has the cllient had a meeting?" If the user puts in yes, the next line cannot have no entered. However they may wish to change the first line to a no which is fine...
  12. G

    counting something and putting it into a variable

    Easy when you know how. thank you for your help
  13. G

    counting something and putting it into a variable

    Thanks for replying. The only other piece of code that relates to this Dim strSQL As String. I relise I may be way of the mark here, but what I am trying to do is count how many records a in a table that have the an id of 12 say. Once I know that I can use it later on to maybe delete a record.
  14. G

    counting something and putting it into a variable

    I am trying to use the code below to put the result into a varible: strSQL = "SELECT COUNT(*) FROM adult_key_pro WHERE adult_key_pro.key_inc_id = 12;" The problem is that the variable has nothing in it when I stop the code using a breakpoint. Any help would be appreciated.
Back
Top Bottom