Recent content by Artair

  1. A

    Open Form – Where condition – multi criteria

    If you want to use more than one criteria, you simply write it like "[ID]=1 And [Name]='Joe Bloggs'" If you want to refer to fields on the form, use something like "[ID]=" & Me.ID & " And [Name]='" & Me.Name & "'"
  2. A

    Tab control, invisible tab when no record

    You're welcome. Glad you got it working.
  3. A

    Tab control, invisible tab when no record

    Each control has a 'Tag' property. On each sub form control (not the form itself, but the control that holds the form, so sfrmPROD1, sfrmPROD2 etc) on the customer card will need the value of its Tag property as the index of the Tab page that the sub form control is on. I've re-attached your...
  4. A

    Tab control, invisible tab when no record

    The reason my initial code isn't working is because for some reason the code isn't running until the form is displayed on the screen by clicking that tab. Try the following piece of code. Put it in the module for frmCUSTOMER_CARD. You will also need to change the Tag property of each subform...
  5. A

    Subform Colors

    Right click a blank area of the datasheet and click on the option 'Datasheet...' this should bring up the datasheet formatting properties. This will allow you to change the background/foreground colours but you still only have limited choice.
  6. A

    Why wont this requery code work?

    Try Me.[Search for a fault using Fault ID subform 2].Requery Although I would suggest not putting spaces in control names, it makes coding much easier.
  7. A

    Tab control, invisible tab when no record

    Unfortunately I don't have Access 2010. Can you convert it to 2003?
  8. A

    Tab control, invisible tab when no record

    Is it just not hiding the tabs or are you getting an error when you open the main form?
  9. A

    Tab control, invisible tab when no record

    I tested the code on a test db before I posted it and it worked as I would expect it to, only my subforms were continuous forms, not data sheets. Don't know if it would make a difference. The only thing I didn't test was having no records in the subform that was contained on the first tab. I...
  10. A

    Tab control, invisible tab when no record

    Try putting the following code into each of the sub forms modules. I've tested this in Access 2003 and it seems to do the trick. Private Sub Form_Load() Dim rs As DAO.Recordset Set rs = Me.Recordset With Me.Parent.TabCtl0.Pages(0) If rs.RecordCount = 0 Then...
  11. A

    Msg box"the record doesn't exist, do you want to create it?"

    I use the following code in one of my databases that does what you want, although I use Access 2003. Just paste it into the forms module. Private Sub Form_Open(Cancel As Integer) Dim rs As DAO.Recordset Set rs = Me.Recordset If rs.RecordCount = 0 Then If MsgBox("This ID does...
Back
Top Bottom