473,385 Members | 1,569 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,385 software developers and data experts.

Data Entry Form problem. Please help!!

I have designed a data entry form with a number of fields and a sub
form. The first field (Country) is a combo box and the user selects a
country. This, in turn reduces the number of options in the second
field (Prospect Name). The user then uses the subform to enter a
document location.
The problem is this:
When the user selects a prospect name, rather than selecting the
existing record it creates a new one with the same name. I have tried
disabling duplicates but then I just get an error message when adding
records.
Although I have somehow managed to create a relatively advanced
database I am a complete novice with access!
Please respond with any ideas or if you need more information.
THANKS
Ed

Nov 13 '05 #1
2 2016
<ed*******@gmail.com> wrote in message
news:ch********@odbk17.prod.google.com...
I have designed a data entry form with a number of fields and a sub
form. The first field (Country) is a combo box and the user selects a
country. This, in turn reduces the number of options in the second
field (Prospect Name). The user then uses the subform to enter a
document location.
The problem is this:
When the user selects a prospect name, rather than selecting the
existing record it creates a new one with the same name. I have tried
disabling duplicates but then I just get an error message when adding
records.
Although I have somehow managed to create a relatively advanced
database I am a complete novice with access!


ComboBoxes are typically used to navigate or they are bound and used for
data entry. Sounds like you want the former, but have created the latter.

If you will sometimes be changing data in both the main form and the
subform then you need your ComboBoxes to be separate controls that are
unbound and are only used to navigate to the proper record in the main
form. Otherwise the main form opens at record one and anything you do with
the ComboBoxes is changing the data in that record.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
>> I have designed a data entry form with a number of fields and a sub
form. The first field (Country) is a combo box and the user selects a
country. This, in turn reduces the number of options in the second
field (Prospect Name). The user then uses the subform to enter a
document location.
The problem is this:
When the user selects a prospect name, rather than selecting the
existing record it creates a new one with the same name. I have tried
disabling duplicates but then I just get an error message when adding
records.
Although I have somehow managed to create a relatively advanced
database I am a complete novice with access!


ComboBoxes are typically used to navigate or they are bound and used for
data entry. Sounds like you want the former, but have created the latter.

If you will sometimes be changing data in both the main form and the
subform then you need your ComboBoxes to be separate controls that are
unbound and are only used to navigate to the proper record in the main
form. Otherwise the main form opens at record one and anything you do with
the ComboBoxes is changing the data in that record.

To expand on Rick's reply, in case you need more detail, consider this:

In the form header, put two unbound combo boxes (i.e., the rowsource is the
same as you've had it, but the control source is blank). Keep the code that
narrows the prospect list based on country selected. Then, in the afterUpdate
property of the prospect combo, put code that moves you to the appropropriate
record.

aircode (watch for line wrap); assume your combo with the prospect list is
called prospectcombo:
dim rs as dao.recordset
set rs=me.recordsetclone
dim strcriteria as string
strcriteria="prospectID=" & me!prospectcombo
rs.findfirst strcriteria
if not rs.nomatch then
me.bookmark=rs.bookmark
endif
rs.close
set rs=nothing

Hope that helps somewhat

Jan
Jan Stempel
Stempel Consulting
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Don Seckler | last post by:
I am trying to set up a PHP web page so I can enter data into a database. I created a form: <form action="admin_news_insert_processor.php" method="post" name="frm_Insert_News"...
2
by: Rajesh | last post by:
dear all, as of now, am working on a simple access database with a normal data entry form Can I design a form in HTML for data entry, and the same be linked to an access database where the...
2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
1
by: Alex.Wisnoski | last post by:
I have a data entry form with a combo box to look up an entrant's name. If the name is already in the table then it pulls up the record and that part of the form works fine. If the name isn't in...
1
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting...
1
by: ajw | last post by:
I am a VB.NET newbie... I have a data entry form with text boxes bound to a dataset. The data source is an Access table with the primary key field being an autoincrement field. Everything works...
2
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the...
1
by: NHNeedsHelp | last post by:
Hi, about to go nuts - I have a master form with 3 control buttons, user picks 1 for Const. job, 2 for Envir job and 3 for Geo job. Each button opens a subform containing the project number from...
0
by: Tyler | last post by:
Made a data entry form which is a subform. I made a continuous form that displays everything entered through the data entry form. The data entry form displays all of the records. This doesn't...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.