473,385 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Checkbox after Update event

I am new to access and need some help with coding.
I have a main form XYZ with 2 subforms. I have a checkbox on subform1 "frmExpediteS" that when checked i would like the Value in Feild "PO" of this subform to appear & populate the feild "PO" in a second subform 2 "frmExpediteDetails". I think I need an after Update event but not sure of the code to use.
Can someone please steer me in the right direction.

Tks
May 25 '07 #1
4 5609
puppydogbuddy
1,923 Expert 1GB
I am new to access and need some help with coding.
I have a main form XYZ with 2 subforms. I have a checkbox on subform1 "frmExpediteS" that when checked i would like the Value in Feild "PO" of this subform to appear & populate the feild "PO" in a second subform 2 "frmExpediteDetails". I think I need an after Update event but not sure of the code to use.
Can someone please steer me in the right direction.

Tks
Try this:

The following assumes that both subforms are direct subs of the main form (subform2 is not sub of subform1). Both subforms have to be opened (but do not have to be visible) in order for this to work.

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCheckbox_AfterUpdate()
  2.    Forms!frmXYZ!frmExpediteDetails.Form!PO.Value = Forms!frmXYZ!frmExpediteS.Form!PO.Value
  3. End Sub
May 25 '07 #2
Thanks Buddy I will give it a go
May 25 '07 #3
Hi Buddy,
I tried your code & I get a synteax error message.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Expedite_AfterUpdate()
  2.  
  3. Forms!frmExpedite!frmExpediteDetails.Form!PO.Value = Forms!frmExpedite!frmExpediteS.Form!PO.Value
  4.  
  5. End Sub
Where am I going wrong.

The main form is "frmexpedite"
Subform 1 is "frmExpediteS" Feild name to copy from "PO"
Subform 2 is "frmExpediteDetails" Feild to copy To "PO"

Tks again for any help


And Yes your right this is how the form is set up.

"The following assumes that both subforms are direct subs of the main form (subform2 is not sub of subform1). Both subforms have to be opened (but do not have to be visible) in order for this to work"
May 26 '07 #4
Thanks for help but its working now, with a lot of help,
the code is
Expand|Select|Wrap|Line Numbers
  1. Private Sub Expedite_AfterUpdate()
  2. Dim Clone As DAO.Recordset
  3.    If Me![Expedite] Then
  4.       Set Clone = Forms!frmExpedite!frmExpediteDetails.Form.RecordsetClone
  5.       With Clone
  6.          .AddNew
  7.          !PO = Me![PO]
  8.          .Update
  9.       End With
  10.    End If
  11.  
  12. End Sub
  13.  
May 26 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
3
by: Jack | last post by:
<i><input type="checkbox" name="chk_Complete" value="TRUE" <%Response.Write l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked" Else Response.Write " unchecked"%>> The above...
2
by: Tomas Vera | last post by:
Hello All, I'm having problems creating a page with dynamic checkboxes in a WebApp. In my app, I need to query a database, then (based on results) add checkboxes to my form and set their...
2
by: Sebi | last post by:
Hello all is it possible to add a checkbox in a DataGrid for Boolean Data? Thanks in advance
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
2
by: Martin | last post by:
Hi, Please can somebody explain how databinding is done on a checkbox list. I have the follwoing code which I would have thought was enough to databind a checkbox, but apparently not. The...
2
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
1
by: dave | last post by:
I have a html table and mutliple rows. On each row i put an onclick event that opesn a modal window and prompts the user for some information. I want this modal window to show when the user...
9
by: mike7510uk | last post by:
Hi, I am using a gridview with a templatefield containing a checkbox. I want to update the database with a 1 or 0 depending on if a checkbox is checked or unchecked (then use the 1 or 0 later on...
8
by: Sid | last post by:
I hope someone could help me with this. I am trying to setup a criteria to decide when to allow/not allow user to click on the check box. logically it looks simple but I am not able to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.