Search results

  1. T

    not in list open form in add mode - code not working

    If you set the DataEntry property to True the form should open at a new record. Because you are using a bound form to add a new record it will normally open at the first record in the recordset. Another way to add your new part is to open a recordset based on the table that holds your parts...
  2. T

    not in list open form in add mode - code not working

    At a guess I would say to open Add_New_Part form with DataEntry=True, other than that I always use a Recordset to write the new record and then requery the original Form/ComboBox.
  3. T

    How to move a subform to a new record ?

    I created a mainform (Form1) with two subforms (sf1Table1 & sf2Table1). On the first subform I placed a command button and put the following into the OnClick event: Private Sub Command13_Click() Forms!Form1.Form!sf2Table1.SetFocus DoCmd.RunCommand acCmdRecordsGoToNew End Sub With sf1Table1...
  4. T

    How to move a subform to a new record ?

    You also had a comma missing in your example: DoCmd.GoToRecord acDataForm, "mySubForm", , acNewRec Regards
  5. T

    How to move a subform to a new record ?

    Then follow by: DoCmd.RunCommand acCmdRecordsGoToNew Regards
  6. T

    Form to Subform - What if no data?

    I have found something like this to be useful, assuming DAO is used: Dim rs as DAO.Recordset Set rs = Me.sfSubForm.Form.RecordsetClone Select Case rs.Recordcount Case >= 1 ' aLL ok Case = 0 ' Display message Case rs.BOF=True and rs.EOF=True ' Display message End Select If the...
  7. T

    I get a "#Name?" when setting a defaultvalue

    Ron_dk is correct. I have tested and used sfrm.txtItineraire.DefaultValue = "'DefaultValue'" Single quotes within the double-quotes.
  8. T

    I get a "#Name?" when setting a defaultvalue

    the best way to set this property is in the property Sheet for the textbox. Data tab, Default Value.
  9. T

    How to move a subform to a new record ?

    You need to setfocus to the subform before moving it to a new record. Me.sfSubFormame.Setfocus Regards
  10. T

    I get a "#Name?" when setting a defaultvalue

    If you want to show the user "DefaultValue" in the textBox then use sfrm.txtItineraire = "DefaultValue" 'Me.txtItinéraire Regards
  11. T

    Requery of Listbox requeries Subform as well

    I have a mainform (Clients) with a listbox (Projects) and a subform (Contacts). The subform is one-to-many with the mainform record. I have my own navigate buttons on the subform to move between records using Recordsetclone and Bookmarks and requerying the mainform listbox after each move. The...
Back
Top Bottom