PC Review


Reply
Thread Tools Rate Thread

Checking for a duplicate value

 
 
=?Utf-8?B?Q2FybGVl?=
Guest
Posts: n/a
 
      18th Apr 2007
Hi there,

I have a form which the user inputs values into various text and combo
boxes. When finished adding all information on teh form, the user clicks
submit, and the values are transferred to a sheet called 'HQ Input'. Each
row has a month field that the user selects from a combo box. There should
only be one row for each month.

Question:
When the user clicks 'Submit', i want excel to open the 'HQ Input' sheet,
loop through the existing rows and make sure the month to be inserted doesn't
already exist. If it does, i want to enable the user to either 'overwrite
the existing month row, or cancel the process.

Can anyone help on this?
--
Carlee
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SGVjdG9y?=
Guest
Posts: n/a
 
      18th Apr 2007
This may help, In the appropriate place in your Submit event:-

With Worksheets("YourSheetName").Range("XX:XX") ' Change as required
Set c = .Find(<date to find>, lookin:=xlValues)
If c Is Nothing Then
' date is unique
Else
' date is not unique
End If
End With

h.

"Carlee" wrote:

> Hi there,
>
> I have a form which the user inputs values into various text and combo
> boxes. When finished adding all information on teh form, the user clicks
> submit, and the values are transferred to a sheet called 'HQ Input'. Each
> row has a month field that the user selects from a combo box. There should
> only be one row for each month.
>
> Question:
> When the user clicks 'Submit', i want excel to open the 'HQ Input' sheet,
> loop through the existing rows and make sure the month to be inserted doesn't
> already exist. If it does, i want to enable the user to either 'overwrite
> the existing month row, or cancel the process.
>
> Can anyone help on this?
> --
> Carlee

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Checking for Duplicate Dirk Goldgar Microsoft Access Forms 0 3rd Aug 2009 06:17 PM
Re: Checking for Duplicate Damon Heron Microsoft Access Forms 0 3rd Aug 2009 06:04 PM
Duplicate checking allows duplicate Business Contacts =?Utf-8?B?VEo=?= Microsoft Outlook BCM 0 10th Nov 2007 07:17 PM
Duplicate checking... =?Utf-8?B?UGVycGxleGVkUGVvbg==?= Microsoft Access Forms 2 14th Aug 2005 02:42 AM
Duplicate Checking =?Utf-8?B?QW5ubWFyaWU=?= Microsoft Access Forms 2 18th Nov 2003 01:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:17 PM.