I've noticed that if you use code for the before update command for unbound
controls, it doesn't really work.
I tried the following:
Me!ExportedYN.u ndo
Cancel = True
DoCmd.CancelEve nt
Exit Sub
However, putting the above code in the before update on unbound controls
does NOT undo their typing. Does anyone know the proper way for unbound
controls?
Many Thanks, 7 6779
"ARC" <an**@andyc.com wrote in
news:BY******** ***********@new ssvr25.news.pro digy.net:
I've noticed that if you use code for the before update
command for unbound controls, it doesn't really work.
I tried the following:
Me!ExportedYN.u ndo
Cancel = True
DoCmd.CancelEve nt
Exit Sub
However, putting the above code in the before update on
unbound controls does NOT undo their typing. Does anyone know
the proper way for unbound controls?
Many Thanks,
The reason is that the before update event may reject an entry
because of a spelling misteak and users get annoyed if they have
to retype the whole mistake instead of just editing the
previously typed data.
In addition to the Cancel = true statement,
put me.ExportedYN.t ext = ""
(I'm guessing that ExportedYN is your control name. .
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
Yes, the ExportedYN is the control name, and it is a checkbox. I tried
setting it back to ExportedYN = 0, but it didn't work...
"Bob Quintal" <rq******@sPAmp atico.cawrote in message
news:Xn******** **************@ 66.150.105.47.. .
"ARC" <an**@andyc.com wrote in
news:BY******** ***********@new ssvr25.news.pro digy.net:
>I've noticed that if you use code for the before update command for unbound controls, it doesn't really work.
I tried the following:
Me!ExportedYN. undo Cancel = True DoCmd.CancelEv ent Exit Sub
However, putting the above code in the before update on unbound controls does NOT undo their typing. Does anyone know the proper way for unbound controls?
Many Thanks,
The reason is that the before update event may reject an entry
because of a spelling misteak and users get annoyed if they have
to retype the whole mistake instead of just editing the
previously typed data.
In addition to the Cancel = true statement,
put me.ExportedYN.t ext = ""
(I'm guessing that ExportedYN is your control name. .
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
"ARC" <an**@andyc.com wrote in
news:3G******** ***********@new ssvr21.news.pro digy.net:
Yes, the ExportedYN is the control name, and it is a checkbox.
I tried setting it back to ExportedYN = 0, but it didn't
work...
Ok, I misinterpreted your statement about " before update on
unbound controls does NOT undo their typing." since you don't
type anything into a checkbox.
Maybe if I understood more about what triggers the need to undo
the checkbox I might be able to offer better suggestions.
>
"Bob Quintal" <rq******@sPAmp atico.cawrote in message
news:Xn******** **************@ 66.150.105.47.. .
>"ARC" <an**@andyc.com wrote in news:BY******* ************@ne wssvr25.news.pr odigy.net:
>>I've noticed that if you use code for the before update command for unbound controls, it doesn't really work.
I tried the following:
Me!ExportedYN .undo Cancel = True DoCmd.CancelE vent Exit Sub
However, putting the above code in the before update on unbound controls does NOT undo their typing. Does anyone know the proper way for unbound controls?
Many Thanks,
The reason is that the before update event may reject an entry because of a spelling misteak and users get annoyed if they have to retype the whole mistake instead of just editing the previously typed data.
In addition to the Cancel = true statement, put me.ExportedYN.t ext = "" (I'm guessing that ExportedYN is your control name. . -- Bob Quintal
PA is y I've altered my email address.
-- Posted via a free Usenet account from http://www.teranews.com
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
ARC wrote:
>I've noticed that if you use code for the before update command for unbound controls, it doesn't really work.
I tried the following:
Me!ExportedYN. undo Cancel = True DoCmd.CancelEv ent Exit Sub
However, putting the above code in the before update on unbound controls does NOT undo their typing. Does anyone know the proper way for unbound controls?
Unbound controls do not have a "previous" value (that is in
the original current record), so Undo is meaningless (in the
context of its definition).
Can't you use the AfterUpdate event and just set the value
to a known value?
Note that in your code above, Cancel = True and CancelEvent
are equivalent and using both is redundant. Cancel = True
is the recommended approach.
--
Marsh
Thanks to both of you!
The need to undo the checkbox is because I have the detail showing repeating
lines, so the repeating lines are bound controls. The form header controls
are all unbound, and I'm saving them via code (since I can't have 2 records
sources, I have to do unbound in for the header controls). The checkbox is a
Taxexempt switch that saves with the header area.
If you want more detail:
Header controls are for a table called Invoices which contain the main
options for the invoice, like date, invoice number, tax exempt (checkbox),
etc. I have them all unbound, and am saving the data manually via code.
Detail controls are bound and use the table InvoiceDetail.
Wish there was a way to do a different record source for the header and
details, but you can't.
Hope that makes more sense,
"Bob Quintal" <rq******@sPAmp atico.cawrote in message
news:Xn******** **************@ 66.150.105.47.. .
"ARC" <an**@andyc.com wrote in
news:3G******** ***********@new ssvr21.news.pro digy.net:
>Yes, the ExportedYN is the control name, and it is a checkbox. I tried setting it back to ExportedYN = 0, but it didn't work...
Ok, I misinterpreted your statement about " before update on
unbound controls does NOT undo their typing." since you don't
type anything into a checkbox.
Maybe if I understood more about what triggers the need to undo
the checkbox I might be able to offer better suggestions.
>> "Bob Quintal" <rq******@sPAmp atico.cawrote in message news:Xn******* *************** @66.150.105.47. ..
>>"ARC" <an**@andyc.com wrote in news:BY****** *************@n ewssvr25.news.p rodigy.net:
I've noticed that if you use code for the before update command for unbound controls, it doesn't really work.
I tried the following:
Me!ExportedY N.undo Cancel = True DoCmd.Cancel Event Exit Sub
However, putting the above code in the before update on unbound controls does NOT undo their typing. Does anyone know the proper way for unbound controls?
Many Thanks,
The reason is that the before update event may reject an entry because of a spelling misteak and users get annoyed if they have to retype the whole mistake instead of just editing the previously typed data.
In addition to the Cancel = true statement, put me.ExportedYN.t ext = "" (I'm guessing that ExportedYN is your control name. . -- Bob Quintal
PA is y I've altered my email address.
-- Posted via a free Usenet account from http://www.teranews.com
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
ARC wrote:
>The need to undo the checkbox is because I have the detail showing repeating lines, so the repeating lines are bound controls. The form header controls are all unbound, and I'm saving them via code (since I can't have 2 records sources, I have to do unbound in for the header controls). The checkbox is a Taxexempt switch that saves with the header area.
If you want more detail:
Header controls are for a table called Invoices which contain the main options for the invoice, like date, invoice number, tax exempt (checkbox), etc. I have them all unbound, and am saving the data manually via code.
Detail controls are bound and use the table InvoiceDetail.
Wish there was a way to do a different record source for the header and details, but you can't.
Seems like you a taking the road up and down the mountain
instead of just walking around the rocks ;-)
Is there a good reason why you are not using a subform for
the invoice details? This way the main form can be bound to
the Invoice record.
--
Marsh
Yes, because I'm trying the new Access 2007 split form. This way, I can use
one form and have the header area look nice and presentable, and still
utilize a datasheet type view in the detail. So if the user maximizes the
form, and is using a big resolution, the datasheet will fill the screen,
which my user's want. I've found if you use a subform, it won't auto-expand,
unless you code it on the resize event.
"Marshall Barton" <ma*********@wo wway.comwrote in message
news:cv******** *************** *********@4ax.c om...
ARC wrote:
>>The need to undo the checkbox is because I have the detail showing repeating lines, so the repeating lines are bound controls. The form header controls are all unbound, and I'm saving them via code (since I can't have 2 records sources, I have to do unbound in for the header controls). The checkbox is a Taxexempt switch that saves with the header area.
If you want more detail:
Header controls are for a table called Invoices which contain the main options for the invoice, like date, invoice number, tax exempt (checkbox), etc. I have them all unbound, and am saving the data manually via code.
Detail controls are bound and use the table InvoiceDetail.
Wish there was a way to do a different record source for the header and details, but you can't.
Seems like you a taking the road up and down the mountain
instead of just walking around the rocks ;-)
Is there a good reason why you are not using a subform for
the invoice details? This way the main form can be bound to
the Invoice record.
--
Marsh
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MLH |
last post by:
I have a form, bound to a query. Its RecordSource property
is a query named frmEnterLienAmounts. The form has a few
bound controls and some unbound controls. The unbound
controls are calculated fields whose DefaultValue property
is set to something like
DLookUp("","tblVehicleJobs","=Forms!frmEnterLienAmounts!VehicleJobID")
The form...
|
by: google |
last post by:
I'm developing an application for use within my company in Access 2003.
I'm new to '03, the application I did for my former employer was in
'97. The two applications have similar functionality (we're sales
offices, and I'm doing things such as associate directories, commission
calculations, order tracking, etc.). 2003 seems to have a few...
|
by: planetthoughtful |
last post by:
Hi All,
I have a mainform with a subform in which I show some task summary
data.
On the mainform I have a number of unbound controls that reflect values
relevant to each task in the subform. The unbound controls are
populated in the subform's OnCurrent even from a number of different
tables related to the records in tbl_tasks, which is...
|
by: David W |
last post by:
Is there a way to set a property to an expression of an unbound control
without doing it in code-behind. For example, if I had a label control, and
wanted to set the Text= property to a Session var - something like:
<asp:Label ID="lblTest" runat="server" Text="<%= Session("name")
%>"></asp:Label>
This of course doesn't work. I know it...
|
by: SBC News Groups |
last post by:
Using VBA how do I assign columns from a table to controls on an unbound
form?
Mike
| |
by: ccsnavy |
last post by:
For some reason referencing an unbound control on an active form from a query has ceased to work correctly. While other previously existing references to unbound controls in the same form seem to work fine new ones just return null or if referencing a combo box some random character (usually a box). In fact any subsequent queries created that...
|
by: yoni |
last post by:
Hi,
I got a grid control, i bind it to a datatable, but it has some extra
fields, with textboxes, checkboxes, dropdowns etc (in a template
field) that are not bound. they are not auto-postback either. user
changes values in them, then clicks submit. anybody knows how i can
get the values in those controls, per each record? (ideally, i could...
|
by: NaftoliGug |
last post by:
Is there a way to have unbound, uncalculated controls (or a calculated control that is based on a function) that retains a different value for each record?
|
by: Mike Hall |
last post by:
MS Access 2007. When doing a simple record select and copy on a continous form, all the unbound controls in the form header get copied as well. Evidence of this is seen if you paste into Excel.
the unbound controls are in some cases, combo boxes and in some cases, text boxes
I have set properties to locked and not enabled and set tab stop...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |