Search results

  1. E

    Delete the current record

    Thanks DBL I slightly amended the code: stdresponse = MsgBox("Are you sure you want to delete this record?" & vbCr & _ "Once it is deleted it cannot be restored. " & vbCr & vbCr & _ "You can only delete one record at a time", vbCritical + vbYesNo, "Delete Offspring") If stdresponse = vbYes...
  2. E

    Delete the current record

    Thanks Ken and DBL; Just to go further with the SQL approach, as I said... I am very new to this; what does the : DoCmd.OpenQuery "QryDeleteOffspring2" Forms!frmBreedingProgramme!sfrmAnimalBreeding.Requery 'important bit ... mean... could maybe expand this a little further
  3. E

    Delete the current record

    Well I have put off embarrasing myself by writing to this forum with my dopey question but here goes: I have been trying to find a method of deleting the current record. My attempt so far is as follows: Dim MyDB As Database Dim MyRS As Recordset Set MyDB = CurrentDb Set MyRS =...
  4. E

    Move and renumber records

    Dim currDB As DAO.Database Dim currRS As Recordset Dim lngMove As Long Set currDB = CurrentDb() Set currRS = currDB.OpenRecordset("AllQuestions", dbOpenDynaset) lngMove = 2 currRS.Move lngMove. Would the 'move' method not work, something like the above (althought this doesn't work either!)...
  5. E

    Move and renumber records

    Don't quite get what you mean??
  6. E

    Move and renumber records

    Hi all I have a database that contains a list of records... ie: 1 | Question one text | Option 1 | Option 2 | etc... 2 | Question two text | Option 1 | Option 2 | etc... 3 | Question three text | Option 1 | Option 2 | etc... 4 | Question four text | Option 1 | Option 2 | etc... I am not...
  7. E

    reuse script

    Hi all Does anybody know of a way of reusing a chunk of VB script in other parts of my code. (So I don't to change all occurrences when I make changes)? Thanks
  8. E

    concatenating labels

    Sorry Ken... Yes it does work!!! Thanks
  9. E

    concatenating labels

    Hi Ken I'm Getting this error: Run-time error '438' Object doesn't support this property or method. Any ideas
  10. E

    concatenating labels

    Can anybody give me some help: I have 5 labels (Label1 ,Label2...etc and I want to change their values on the click of a button). But I'm have trouble concatenating. Here is my idea: For j = 1 To 5 Me."Label" & j.Value = "Drop" & 1 Next j I know the code is wrong but the idea is...
  11. E

    Submit record

    Its OK, I think I have come up with a work round. Thanks
  12. E

    Checkbox woes

    After a bit of tinkering...! That seems to have done the trick! Thanks very much :D
  13. E

    Checkbox woes

    Sure thing... here it is!!
  14. E

    Checkbox woes

    Could I send my file??
  15. E

    Checkbox woes

    Just stumbled on something that may be significant. if I use: Me.Controls("Correct" & j).Value = False in a Private Sub Form_Open(Cancel As Integer) it doesn't work. Yet in: Private Sub QuestionType_Change() it works fine???
  16. E

    Checkbox woes

    Can you actually set a value to an object. ie make a checkbox checked depending on a decision? eg. Me.Option1.Value = "True" would that actually work?
  17. E

    Checkbox woes

    Thanks for your patience: Could you show me how you incorporated the dim and what the dim does please? (I'm a complete newbie if you hadn't guessed!)
  18. E

    Checkbox woes

    me!Option1.Value = "True" ?? I think I need to make myself a bit clearer. Option(1-5) is a text box controls. Correct(1-5) are checkbox controls. The following code is where I'm having the problem (Stuff in orange): Private Sub Form_Open(Cancel As Integer) If QuestionType =...
  19. E

    Checkbox woes

    They are checkbox controls
  20. E

    Checkbox woes

    I have created an event proceedure attached to a drop down list, and when the value changes, I have created the following code: If QuestionType = "TF" Then For j = 1 To 5 If j < 3 Then Me.Controls("Correct" & j).Enabled = True Else Me.Controls("Correct" & j).Enabled = False...
Back
Top Bottom