Hello,
I have a textbox where the user enters a category for a product selected on a combo box. The user has to select a LOT of products and most of the time he enters them in order of category, so for every product (new record) he has to type AGAIN the "category" in the category textbox. Is there a way that this textbox "remembers" the last thing typed in, so that if its correct the user DOESNT have to type again???? But that he could also type a different thing in case the last category doesnt apply to the new record (product)???
Please help,
Gilberto
5 2840 NeoPa 32,568
Recognized Expert Moderator MVP
Consider some code which notes the value of the category when a new record is succesfully added and sets the default value of the control on the form to that value. This will not effect the layout of the underlying table and will be temporary for that instance of the form.
Consider some code which notes the value of the category when a new record is succesfully added and sets the default value of the control on the form to that value. This will not effect the layout of the underlying table and will be temporary for that instance of the form.
Thanks NeoPa...for ALL your replies. Could you give me any code to achieve this and where/what event should i enter it?
The table is called ENGINEERING with the LEVEL4LABEL field.
The form is called ENGINEERING and the textbox called LEVEL4TEXT.
Thanks
NeoPa 32,568
Recognized Expert Moderator MVP
I'm afraid this is not a coding service Gilberto.
We try to assist people to understand the subject better and help them past their hurdles.
I am happy to spend some time assisting and answering relevant question, or even explaining issues, but I will not simply provide you with the code. I will, however, step in with comments (or even code) when you post your attempts as long as they seem honest attempts to get the job done.
As to the event used, I would suggest the AfterUpdate event of the form (the form must be bound to the recordset). This will enable you to catch the update as it's happened and (testing Me.NewRecord) determine if the Me.ControlName. DefaultValue needs to be changed. Me.NewRecord may only be set in the BeforeUpdate event as it happens. You will need to check that out and use that event instead if necessary. If I find an answer to this I will post.
NeoPa 32,568
Recognized Expert Moderator MVP
As luck would have it, it does need to be in the Form_BeforeUpda te procedure. I did some tests and the Me.NewRecord property is reset (understandably enough) when the record is saved.
As luck would have it, it does need to be in the Form_BeforeUpda te procedure. I did some tests and the Me.NewRecord property is reset (understandably enough) when the record is saved.
I get your point, totally understandable. I will try to follow your comments, do some testing and see what happens.
Again, thanks for your time and effort.
Gilberto
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: PT |
last post by:
I got a problem. And thats.....
First of all, I got these three tables.
------------------- ------------------ ----------------------
tblPerson tblPersonSoftware tblSoftware
------------------- ------------------ ----------------------
PID PName PID* SID* SID SWName
--- ----- --- --- --- ------
1 Thomas 1 1 ...
|
by: jason |
last post by:
I've got this javascript routine (i found on google - thank you) in an
asp.net page that on page reload sets the cursor of a textbox to the
last line. It works great!
Using a similar concept, I have another application that uses a
textbox like an editor window and has a save and other buttons.
Problem is - when I save/post/reload, the textbox returns to cursor
the top again.
How can I preserve / save the exact cursor spot and return...
|
by: tdmailbox |
last post by:
I have a form with a child form. In the child form there is a list of
names that can grow quite large. On the parent form I want to display
the first name from the child form. I set up a test box that is
populated with the code
=subfrm_media_review_sec_party.Form!first_name & " " &
subfrm_media_review_sec_party.Form!last_name
It works except that when I flip through the names it populates the
parent form with the name of what ever...
|
by: Zlatko Matiæ |
last post by:
There is a form (single form) and a combobox. I want that current record of
the form is adjusted according to selected value in the combobox. Cuurrent
record should be the same as the value in the combobox.
What is the solution?
Thank you in advance.
|
by: Robert |
last post by:
I have a label on my form lblCount and the following code in my form for
displaying a record count:
Private Sub Form_Current()
Me.RecordsetClone.Bookmark = Me.Bookmark
Me!lblCount.Caption = Me.RecordsetClone.AbsolutePosition + 1
End Sub
It works fine until I page to the last record and I get:
| |
by: Bill |
last post by:
Hello,
Could anyone post some simple code or advise me on how I can display the SSN
number like *****7890 in a text box, even thought the user entered
1234567890, and the value of the variable would remain the same.
Only thing I can think of is, accept the user input load it into a varible,
and then just take the last 4 digits of the number and concatenate it to 5
*'s and replace the text box variable with that.... I was hoping there was a...
|
by: Richard Carpenter |
last post by:
I understand how to use a dropdown list control to display the
associated description value for a foreign key in a parent rather than
the key itself, but I don't like having to disable the control when I
want to prevent editing (simply displaying in the display template of a
datalist or detailview control, for example). I've not been able to
find a way to edit the disabled color of the dropdown list, so it
appears very washed out - just...
|
by: jasone |
last post by:
Hi all!
im developing a system where a user can select what flower goes into their bouquet, and ive become a little bit stuck... heres what ive done to date:
currently ive got a page displaying a tables records (the flowers) the page has a checkbox next to each record where the record primary key has been assigned to the checkbox.
once the user select the items and clicks sumbit it takes them to a 'choice' page to display the flowers...
|
by: bonneylake |
last post by:
Hey Everyone,
Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place.
what i am trying to display previously entered multiple fields. I am able to get my serial fields to display correctly, but i can not display my parts fields correctly.
Currently this is what it does
serial information 1
parts 1
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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.
| |