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
4 1468
Beany
I'm not sure what you mean. Normally to add records to a table or query you create a form bound to the table or query and put controls on the form bound to each of the fields. The form wizard can help with this.
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
NeoPa 32,556
Expert Mod 16PB
I'm not sure exactly what you're after here, but I've designed a form class which enables the code to open one form from another. The calling object is automatically hidden until the called form is closed, at which time the calling form is reshown. Class - classForm - Option Compare Database
-
Option Explicit
-
-
Private WithEvents frmTo As Form
-
-
Private frmParent As Form
-
-
Public Property Set frmFrom(frmValue As Form)
-
Set frmParent = frmValue
-
End Property
-
-
Private Property Get frmFrom() As Form
-
Set frmFrom = frmParent
-
End Property
-
-
Public Function ShowForm(strTo As String) As Boolean
-
ShowForm = True
-
'Handle error on OpenForm() only.
-
On Error GoTo ErrorSF
-
Call DoCmd.OpenForm(strTo)
-
On Error GoTo 0
-
Set frmTo = Forms(strTo)
-
frmFrom.Visible = False
-
Exit Function
-
-
ErrorSF:
-
ShowForm = False
-
Call ErrorHandler(strName:=strTo, _
-
strFrom:=frmFrom.Name & ".ShowForm", _
-
lngErrNo:=Err.Number, _
-
strDesc:=Err.Description)
-
End Function
-
-
'************************* Contained Object Method(s) *************************
-
'For these subroutines to be activated the contained object must have the
-
''On Close' property set to a valid subroutine within the contained object.
-
Private Sub frmTo_Close()
-
frmFrom.Visible = True
-
Set frmTo = Nothing
-
End Sub
-
'******************************************************************************
This is an example of the code for (my main menu) form which uses it (as a calling and a called form). - Option Compare Database
-
Option Explicit
-
-
Private clsTo As New classForm
-
-
Private Sub Form_Open(Cancel As Integer)
-
Call DoCmd.Restore
-
Set clsTo.frmFrom = Me
-
End Sub
-
-
Private Sub cmdAdHocMenu_Click()
-
Call clsTo.ShowForm(strTo:="frmAdHocMenu")
-
End Sub
-
-
Private Sub cmdCustSPMenu_Click()
-
Call clsTo.ShowForm(strTo:="frmCustSPMenu")
-
End Sub
-
-
Private Sub cmdExit_Click()
-
Call DoCmd.Close(ObjectType:=acForm, ObjectName:=Name)
-
End Sub
-
-
Private Sub Form_Close()
-
'Allows container to handle event.
-
End Sub
Notice the Form_Close() sub MUST exist - even if it contains only a comment line.
PEB 1,418
Expert 1GB
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
-
-
-
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
thanks fellas,
im gonna have a try with the info u have provided!
cheers
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Technical Group |
last post by:
Friends,
Can anybody help me out by sending a piece of C# code showing how to add an
active directory user to a particular user group? If the group does not
exist, then create it.
Thanks in...
|
by: Josema |
last post by:
Hi,
Im starting to do the navigation of a portal, and for it, im using
usercontrols....
Actually i have a user control in the top of the page that has some menus
(contact, register, etc...)
...
|
by: John |
last post by:
Hi all,
This really is quite an urgent matter.
I have a page with multiple, dynamically-loaded user controls and when a
user clicks on a button, the whole form is submitted. Now at this stage...
|
by: Tim Thomas |
last post by:
Hi,
I am very new to .NET and am in the process of building my first web
application.
I will briefly describe what i am trying to achieve:
I have a system where suppliers register their...
|
by: Jonah Olsson |
last post by:
Hello guys,
I have an application which is built upon several user controls. That is, I
have a default template (default.aspx) that I load a user control into
(using placeholders in the...
|
by: Earl Teigrob |
last post by:
PROBLEM:
When a user control is loaded into a PlaceHolder control more than once, the
events do not fire on the first click of a control on the dynamically loaded
user control. In other words, the...
|
by: Kris van der Mast |
last post by:
Hi,
been a while since I posted a question myself instead of trying to help
others out.
I'm refactoring an existing web app that uses dynamic loading of user
controls and a lot of...
|
by: Bijoy Naick |
last post by:
I've written a simple file upload user control in VB .NET. It comprises of
an InputFile HTML Server Control, an Upload button and a message label.
User clicks on the Browse button of the...
|
by: Dave |
last post by:
(Second Try)
Greetings,
I have an asp.net web application that utilizes a User Control at the top of
the page.
My User Control contains a Server Control menu which will require postbacks.
...
|
by: Steve Booth |
last post by:
I have a web form with a button and a placeholder, the button adds a user
control to the placeholder (and removes any existing controls). The user
control contains a single button. I have done all...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |