473,387 Members | 3,750 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,387 software developers and data experts.

Updating Table only with new information from list box on form

ChaseCox
294 100+
Hi everyone, I am running into a new problem with my database. Since I have become a member of The Scripts, I have never had to update information in a table, rather I only had to allow people easy access to the already exsitant information. My problem is this, and I am sure it very simple.

I have a list box on a form. I want the user to be able to insert their email adress and have it stored in a table. I have this working so far, and I have even set up criteria so that it makes sure it has the right domain for the company.

My question is how do I keep a user from inputting a duplicate of something that is already in the table. The table name is Emails, the column in the table is Personal, and the DB is ChickenSoup for example purposes. Any thoughts would be great thanks. I am using Access 97
Apr 10 '07 #1
3 1145
MMcCarthy
14,534 Expert Mod 8TB
Hi everyone, I am running into a new problem with my database. Since I have become a member of The Scripts, I have never had to update information in a table, rather I only had to allow people easy access to the already exsitant information. My problem is this, and I am sure it very simple.

I have a list box on a form. I want the user to be able to insert their email adress and have it stored in a table. I have this working so far, and I have even set up criteria so that it makes sure it has the right domain for the company.

My question is how do I keep a user from inputting a duplicate of something that is already in the table. The table name is Emails, the column in the table is Personal, and the DB is ChickenSoup for example purposes. Any thoughts would be great thanks. I am using Access 97
If you index the appropriate field in the table to Yes (No Duplicates) then the user cannot enter a value already in the table.

Mary
Apr 11 '07 #2
ChaseCox
294 100+
If you index the appropriate field in the table to Yes (No Duplicates) then the user cannot enter a value already in the table.

Mary
very nice! I had no idea about that, thanks.
Apr 12 '07 #3
ChaseCox
294 100+
Do you or anyone else have thought on how to update a table that is on a network drive? I can not seem to get it to work. Just wondering. here is my code.

Expand|Select|Wrap|Line Numbers
  1. Private Sub email_AfterUpdate()
  2. On Error GoTo Err_email_Click
  3.  
  4.         Dim FalconAnalysis As Object
  5.         Dim tblEmails As Object
  6.         Dim colEmail As Object
  7.         Set FalconAnalysis = CurrentDb
  8.         Dim emails As Recordset
  9.         Set emails = FalconAnalysis.OpenRecordset("Emails",    dbOpenTable)
  10.         Dim strStringArray()
  11.         Dim x As String
  12.  
  13.         If Right([Forms]![Test]![email], 9) = "trane.com" Then
  14.  
  15.             emails.AddNew
  16.             emails.Fields(0).Value = [Forms]![Test]![email]
  17.             emails.Update
  18.             emails.Close
  19.  
  20.         Else
  21.             x = MsgBox("Please Enter an Actual Work Email.", vbOKCancel)
  22.        End If
  23.             x = MsgBox("Thank You for Registering.", vbOKCancel)
  24.  
  25. Exit_email_Click:
  26.     Exit Sub
  27.  
  28. Err_email_Click:
  29.             x = MsgBox("Your Email is Already Registered, Thank You.", vbOKCancel)
  30.             Resume Exit_email_Click
  31. End Sub
  32.  
The tblEmails is actually a link table in a database called FalconDataStorage. Any Thoughts on how to get this to work?

The purpose is to be able to keep track of who is using the database so that I can email them updates as they go.
Apr 12 '07 #4

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

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
1
by: Old Timer | last post by:
I wish to type in a number in my "Code" field, for instance 1060, I then wish the number 1060 to trigger an event that will fill in the next field (township field) For instance, 1060 brings up and...
1
by: chrisc | last post by:
Hello, Im using redemption in a database created in ms access. At the moment emails are generated depending on various actions within a database. To give an example: Public Const...
1
by: Karen Hill | last post by:
I have a list box that is populated by an SQL statement. On that form, I have a button that opens another form that the user adds data to the table that the SQL statement uses to populate the...
2
by: underground | last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is the form <? include("include/session.php");...
5
by: joshua.nicholes | last post by:
I have an access database that consists of two tables.A data collection table and a species list table. The data collection table has about 1500 records in it and the species list has about 600....
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
4
by: Clint Schaefer | last post by:
Apologies in advance. I've seen similar questions, but none of the solutions seem to be working for me... I have a form that allows a user to select mutiple items (payroll deduction codes) in a...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
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...

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.