Unanswered: looping from s/f to m/f as long as there are more m/f records
Thanks for checking my post! Looking for some help on this scenario -
My mainform opens from a dialog box and can return a single chosen record or several records.......
Each m/f has a s/f in which a new entry is going to be made. Every s/f already has one or more records. The focus is set to the s/f and the s/f uses a DMAX Form_Current to copy a value from it's previous record. That's all well and good working. Although, I think I am missing something in the Form_Current because even though it does allow me to go through my other controls, it won't let me out. I tab out of the last control and nothing happens.
What I am trying to do is exit out of my last s/f control back to my m/f...I have an Exit button there cleverly called Command65...I want to use that button to see of there is a next m/f record. If there is, I want to go to the next record and loop through again s/f entry, exit to m/f, s/f entry, exit to m/f by using the tab key.
The button should also allow the user to click and close the m/f if they are not going to finish updating each of these at this time.
Here is the code I have now......
SUBFORM = MOVEREG
**this is where I seem to be stuck in the s/f - not sure if I have properly closed the error handling and exiting. FYI: This "error" is bogus since I will always have records returned to me**
Private Sub Form_Current()
On Error GoTo Err_Form_Current
Private Sub SLU2_GotFocus()
**this triggeres as expected**
If IsNull(SLU) Then
MsgBox "Please Register To Salesman 1 before entering split salesman!"
Private Sub RNOTES_Exit(Cancel As Integer)
**this doesn't do anything at all - I have no cursor, no focus**
Private Sub Command65_Click()
DoCmd.Close acForm, "MoveActiveSLMNChooser"
DoCmd.Close acForm, "MoveAccount2211"
Private Sub Command65_GotFocus()
**I'm not sure about this yet b/c I haven't been able to get the Focus here from the subform**
If CurrentRecord - RecordsetClone.RecordCount Then
DoCmd.Close acForm, Me.Name
**this is intended to close the entire thing down if I open a single m/f records(which my dialog box gives me the option to do**
DoCmd.GoToRecord , , acNext
Private Sub Form_Load()
**This triggers okay, and I need it to do the same if I am in the next record, too.....I haven't got there yet. Will Load trigger for each m/f, or do I need to start with Open and also put in Load or Activate**
Does anyone recognize what I'm missing???? Your help is appreciated!