Here's a good one that keeps defeating me...
I have a continuous form that has a date textbox as one of the controls.
The user can choose any date they like including one they have already
entered before.
If the date they have just entered is already present I want to warn them
and give them the option to keep the date or blank it.
I couldn't get a dlookup to work for some unknown reason so now i'm looping
through a recordset and the codes getting more complicated by the hour
especially when you throw in the validation aspects.
Any ideas about how to implement this well?
thanks
Martin 3 2069
Deano wrote: Here's a good one that keeps defeating me...
I have a continuous form that has a date textbox as one of the controls. The user can choose any date they like including one they have already entered before. If the date they have just entered is already present I want to warn them and give them the option to keep the date or blank it.
I couldn't get a dlookup to work for some unknown reason so now i'm looping through a recordset and the codes getting more complicated by the hour especially when you throw in the validation aspects.
Any ideas about how to implement this well?
thanks Martin
And another thing;
I am trying to put some code in the afterupdate event of the date textbox to
check to see if it's unique or not. The event only fires if i remove the
date and move off it. If I enter a date, either manually or using a date
picker, nothing happens!!
Anyone know why this is so? I really need this event to fire.
thanks
Martin
"Deano" <ma************ @hotmail.com> wrote in
news:ek******** ***********@war ds.force9.net: Deano wrote: Here's a good one that keeps defeating me...
I have a continuous form that has a date textbox as one of the controls. The user can choose any date they like including one they have already entered before. If the date they have just entered is already present I want to warn them and give them the option to keep the date or blank it.
I couldn't get a dlookup to work for some unknown reason so now i'm looping through a recordset and the codes getting more complicated by the hour especially when you throw in the validation aspects.
Any ideas about how to implement this well?
thanks Martin And another thing;
I am trying to put some code in the afterupdate event of the date textbox to check to see if it's unique or not. The event only fires if i remove the date and move off it. If I enter a date, either manually or using a date picker, nothing happens!!
Anyone know why this is so? I really need this event to fire.
thanks Martin
I suspect that your woes with both problems stem from using the
AfterUpdate event instead of BeforeUpdate, and/or the textbox's
value property instead of its .text property.
Instead of Dlookup or looping through a recordset, try
Me.RecordsetClo ne.FindFirst "Senioriter = #" & Me.Text8.Text & "#"
If Me.RecordsetClo ne.NoMatch Then
'Date will be unique
MsgBox "date not found"
Else
MsgBox "date found !!!!"
'display warning
End If
Bob
Bob Quintal wrote: "Deano" <ma************ @hotmail.com> wrote in news:ek******** ***********@war ds.force9.net:
Deano wrote: Here's a good one that keeps defeating me...
I have a continuous form that has a date textbox as one of the controls. The user can choose any date they like including one they have already entered before. If the date they have just entered is already present I want to warn them and give them the option to keep the date or blank it.
I couldn't get a dlookup to work for some unknown reason so now i'm looping through a recordset and the codes getting more complicated by the hour especially when you throw in the validation aspects.
Any ideas about how to implement this well?
thanks Martin
And another thing;
I am trying to put some code in the afterupdate event of the date textbox to check to see if it's unique or not. The event only fires if i remove the date and move off it. If I enter a date, either manually or using a date picker, nothing happens!!
Anyone know why this is so? I really need this event to fire.
thanks Martin
I suspect that your woes with both problems stem from using the AfterUpdate event instead of BeforeUpdate, and/or the textbox's value property instead of its .text property.
Instead of Dlookup or looping through a recordset, try
Me.RecordsetClo ne.FindFirst "Senioriter = #" & Me.Text8.Text & "#" If Me.RecordsetClo ne.NoMatch Then 'Date will be unique MsgBox "date not found" Else MsgBox "date found !!!!" 'display warning End If
Bob
Thanks i'm playing around with that but still having problems with either
the BeforeUpdate OR AfterUpdate firing. They only fire it I remove the date
from the textbox and move off.
The only way I can get any code to execute is if I place it in the LostFocus
event which is less than ideal!
I'm using an input mask for the date in the textbox - would that present a
problem? (just about to test that....) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RC |
last post by:
I am try test a simple HTML form with PHP
<form method=POST action="testing.php">
Cat <input type="checkbox" name="pet" value="cat">
Dog <input type="checkbox" name="pet" value="dog">
Pig <input type="checkbox" name="pet" value="pig">
<br>
<select name="dates" multiple>
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
|
by: Richard Hollenbeck |
last post by:
I'm trying to write some code that will convert any of the most popular
standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan
1908) and compare the first with the second and calculate days, months, and
years. This is not for a college course. It's for my own personal
genealogy website. I'm stumped about the code. I'm working on it but not
making much progress. Is there any free code available anywhere? I know it...
|
by: Robert |
last post by:
Need some help with this please.
Is there a way to display more than one record at a time on a popup form? I
have a main form that has a button that triggers a popup form that is a
continuous form displaying varying numbers of records depending on the
crietria selected on the main form.
Must be missing something obvious - but can't get it to work no matter what
combination of property settings is used for both the pop up form itself...
|
by: Greg Neef |
last post by:
I need to develop a Tab Form where selecting a particular key from an
unbound combo listbox will resulting in the display one or many
records from several tables, where each tab has the matching rows for
the selected key.
There does not appear to be a similar example in the Northwind
database. The objective is to show related records from several
tables which have a common partial key. It seems that I cannot use a
single query as the...
|
by: misscrf |
last post by:
I am currently working on a database, in 3rd normal form, which is for
candidates who apply for a job with the law firm that I
workd for. My issue is with good form design.
I have a main form. Then I have 3 pages on a tab control ( 4 if the
type of candidate validates that is is to be shown) Each page
has a subform. The subforms can be either single or continuous, I
think I am still deciding what I want to lock down this entry...
| |
by: MHenry |
last post by:
Hi,
I know virtually nothing about creating Macros in Access.
I would appreciate some help in creating a Macro or Macros that
automatically run(s) 14 Queries (three Make Table Queries, and 11
Append Queries) when the Database is first opened, and then again
anytime I invoke the Macro (somehow) after the database is already
open. The latter function is useful, because the queries must be rerun
every time data is added, deleted, or...
|
by: Ralph2 |
last post by:
Some time ago with a lot of help from this group I made a reasonably
successful database to keep track of our shop drawings. However the
searching mechanism is too complicated for the occasional user and I
would like to change the whole process.
I would like to duplicate the layout of my form... but each field
becomes a simple "searching" ListBox. On completing any one search
field all the rest are filtered to this value. Subsequent...
|
by: NumberCruncher |
last post by:
Hi All,
I am struggling with setting up my first system of tables, forms,and reports, and could use your help!
I am setting up a database to keep track of the production of a produced item. The item is a panel, with a specific texture. There are standard panels that are then produced in a limited number of specific textures. The number of panels/project varies, so I keep track of the actual number of panels per project with the count:...
|
by: realayumi |
last post by:
ACCESS 2003
WIN XP
Hi, i'm new in access, just a view days, this is my first post.
Sorry for my bad English.
I have 3 tables.
tbl_product
|
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: 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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: 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: 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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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 we have to send another system
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |