473,471 Members | 4,629 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

automatic filling record ?

Hi !
i'm falling in headache status.
i have 3 forms linking together by the sub/main form way.
1st form named fcontract: biggest
2nd form named fdetailcontract
3rd named fshipmentcontract: is smallest.
1st & 2nd linked by ContNo.
2nd & 3rd linked by a togglelink button through fields: ContNo and ProNo.
i want to fill ContNo and ProNo of 3rd by the value of these record of 2nd
that i just type in 2nd. i mean when i press the togglelink to open the
3rd for adding new record, ContNo and ProNo are filled automatically by
the value of ContNo and ProNo of 2nd after each new record.
i made them by wizard and i want to revise the code for my goal. but it is
false.
how can i solve them?
Pls help !
thanks in advance
here are the code create by wizard

Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err

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![FshipmentContract].DataEntry = True
Else
Forms![Fshipmentcontract].Filter = "[ContNo] = " & """" &
Me.[ContNo] & """" & " AND [ProNo] = " & """" & Me.[ProNo] & """"
Forms![FGIAOHANG].FilterOn = True
End If

Sep 29 '06 #1
3 1847
luanhoxung wrote:
Hi !
i'm falling in headache status.
i have 3 forms linking together by the sub/main form way.
1st form named fcontract: biggest
2nd form named fdetailcontract
3rd named fshipmentcontract: is smallest.
1st & 2nd linked by ContNo.
2nd & 3rd linked by a togglelink button through fields: ContNo and ProNo.
i want to fill ContNo and ProNo of 3rd by the value of these record of 2nd
that i just type in 2nd. i mean when i press the togglelink to open the
3rd for adding new record, ContNo and ProNo are filled automatically by
the value of ContNo and ProNo of 2nd after each new record.
i made them by wizard and i want to revise the code for my goal. but it is
false.
how can i solve them?
Pls help !
thanks in advance
here are the code create by wizard

Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err

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![FshipmentContract].DataEntry = True
IF Me("fdetailcontract").Form.Recordsetclone.RecordCo unt 0 then
Forms![FshipmentContract]!ContNo = Me.ContNo
Forms![FshipmentContract]!ProdNo = Me("fdetailcontract")!ProdNo
ENdif
Else
Forms![Fshipmentcontract].Filter = "[ContNo] = " & """" &
Me.[ContNo] & """" & " AND [ProNo] = " & """" & Me.[ProNo] & """"
Forms![FGIAOHANG].FilterOn = True
End If
In your OnCurrent event of the shipment form shipment you could enter
something like the following instead.
If Me.newRecord then
Me.ContNo = Forms!fcontract!ContNo
Me.ProdNo = Forms!fcontract!fdetailcontract!ProdNo
Endif
Sep 29 '06 #2
goodmorning Salad !!
you're my hero(are u male?:))
it do as my mind !! greatly
thanks!thanks!thanks in advance.
luan from VietNam.

Sep 30 '06 #3
goodmorning Salad !!
you're my hero(are u male?:))
it do as my mind !! greatly
thanks!thanks!thanks in advance.
luan from VietNam.

Sep 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
2
by: hennakapoor | last post by:
How do the form filling software determine which text field gets what data i.e. a typical form filling software will ask the user to enter the username / address / password etc. Whenever it goes to...
2
by: anony | last post by:
Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date...
0
by: BULYABA | last post by:
Hello there, i have designed a form called visit form, it's record source is called the visit table. In this form i have fields that look exactly like those in the ClRegistry table. So what i want...
10
by: Anil Gupte | last post by:
I am playing a Windows Media File which is protected by their DRM. I want to be able to automatically fill in the form asking for payment with my saved parameters. Is there any way to do this? ...
2
by: trilokjain | last post by:
Hi, I want to know, how is automatic querying done. FOr example if I want to get information about flights from the website of an Airline, how can I do it automatically? Instead of filling the form...
3
by: tariqanwar | last post by:
hi..... can any body give me a java script for automatic form filling
1
by: joekmps | last post by:
Friends, I have a table called salesperson with different fields like salesPID, salesPName etc. Then I have another table sales with a field like salesPID and salesPName. After creating the...
4
by: margot | last post by:
Hello, I have a question I have a form call Add record. The user needs to fill out several fields and then after pressing the Add button it will add the record to a table. I would like to create a...
0
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.