It seems me that this is a wizard for this!
Main/Subform wizard that creates separate forms and fills them on clicking a bouton... But in the old versions this wizard isn't present!
The code that you have to adapt is:
-
Sub Form_Current()
-
On Error GoTo Form_Current_Err
-
-
If ChildFormIsOpen() Then FilterChildForm
-
-
Form_Current_Exit:
-
Exit Sub
-
-
Form_Current_Err:
-
MsgBox Error$
-
Resume Form_Current_Exit
-
-
End Sub
-
Sub ToggleLink_Click()
-
On Error GoTo ToggleLink_Click_Err
-
default_object_value = Me.[ID_obj]
-
If ChildFormIsOpen() Then
-
CloseChildForm
-
Else
-
OpenChildForm
-
FilterChildForm
-
End If
-
-
ToggleLink_Click_Exit:
-
Exit Sub
-
-
ToggleLink_Click_Err:
-
MsgBox Error$
-
Resume ToggleLink_Click_Exit
-
-
End Sub
-
Private Sub FilterChildForm()
-
-
If Me.NewRecord Then
-
Forms![Object_info].DataEntry = True
-
Else
-
Forms![Object_info].Filter = "[ID_obj] = " & Me.[ID_obj]
-
Forms![Object_info].FilterOn = True
-
End If
-
-
End Sub
-
Private Sub OpenChildForm()
-
-
DoCmd.OpenForm "Object_info", acFormDS
-
If Not Me.[ToggleLink] Then Me![ToggleLink] = True
-
-
End Sub
-
Private Sub CloseChildForm()
-
-
DoCmd.Close acForm, "Object_info"
-
If Me![ToggleLink] Then Me![ToggleLink] = False
-
-
End Sub
-
Private Function ChildFormIsOpen()
-
-
ChildFormIsOpen = (SysCmd(acSysCmdGetObjectState, acForm, "Object_info") And acObjStateOpen) <> False
-
-
End Function
-
-
-
Quote:
Originally Posted by Beany
Alright peeps,
Im trying to add details to a database called "tab_main". I wana add details such as phone number, name, imei no, PUK code, tariff etc etc for a mobile phone user.
Ive created an empty form with all the neccesary text fields and also a seperate form for just the New User button (the way i would like it l ).
I need some help and advice................
How do i click on the New User Button and show the empty form on a new window? and also on the empty form, i need an 'add button' that will allow me to add the details once the form is completed??? ANY1 GOT THE full CODE FOR THIS? OR ARE THERE ANY EXAMPLES AVAILABLE FOR ME TO VIEW????????????
Ur response will be highly appreciated.... thank you