473,769 Members | 4,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Entry Form

I have a form (Prospect) with a subform (Document).

The result I am looking for is this:

The user selects a prospect which is made up of Prospect Name, Country,
Company and Prospect Type. They can then use the subform to add records
into the database with the above information already there.
At the moment I have four combo boxes in the Prospect part of the form.
The user can use the combo boxes to select a prospect. The document
subform has the "data entry" property enabled so the user enters
document names and locations.

The problem is that rather than inserting each document under prospect
names which already exist, Access is creating a new propsect (with the
same name but different ID) and filing them under that.

How can I use the combo boxes to navigate to a particular prospect
record (an add prospect feature is not required), and have access put
the documents inserted in the subform into this?

Here is a screenshot of the form if it will help:
http://img35.exs.cx/img35/9764/eg1.jpg

Thanks
Ed

Nov 13 '05 #1
1 2329
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I suggest that you set up your form in 2 sections:

Header section - search section.

Detail section - Prospect record section and Document subform (keep your
current set up).

In the Header section put the Combo Boxes that define the Prospect
search. These Combo Boxes are UNBOUND controls (that means their
ControlSource property is empty) - be sure these controls have different
names than those controls in the Detail section. Use the same RowSource
values that you are using for the ComboBoxes in the Detail section.
Place a CommandButton in the Header section that initiates the search
after all the criteria has been selected/entered in the search Combo
Boxes.

The CommandButton OnClick event is set up to change the WHERE clause of
an SQL statement. The WHERE clause is created by reading the values of
the header section ComboBoxes. E.g.:

Private Sub cmdSearch_Click ()

const SQL = "SELECT * FROM table_name WHERE "

dim strWhere as string

If Not IsNull(Me!cboCo untry) Then
' value in Country ComboBox is string & requires delimiters
strWhere = "Country = '" & Me!cboCountry & "' "
End If

If Not IsNull(Me!cboPr ospectType) Then
If Len(strWhere)>0 Then strWhere = strWhere & " AND "
' value in ProspectType ComboBox is number
strWhere = "ProspectTy pe = " & Me!cboProspectT ype
End If

' ... other search criteria controls are parsed

' Put the new SQL string in the form's RecordSource property
Me.RecordSource = SQL & strWhere

' You don't need to requery the form: putting a value in the
' RecordSource propery automatically requeries the form.

End Sub

You should put in error traps/handler code and other criteria controls
as needed.

--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQUhokIechKq OuFEgEQLcCgCgoR LK2sCnrVFGkj0UR IB56Y/FLfQAnjuL
LG/0Kc8dBx0HVtvAPX R1ZgLT
=GT3s
-----END PGP SIGNATURE-----
ed*******@gmail .com wrote:
I have a form (Prospect) with a subform (Document).

The result I am looking for is this:

The user selects a prospect which is made up of Prospect Name, Country,
Company and Prospect Type. They can then use the subform to add records
into the database with the above information already there.
At the moment I have four combo boxes in the Prospect part of the form.
The user can use the combo boxes to select a prospect. The document
subform has the "data entry" property enabled so the user enters
document names and locations.

The problem is that rather than inserting each document under prospect
names which already exist, Access is creating a new propsect (with the
same name but different ID) and filing them under that.

How can I use the combo boxes to navigate to a particular prospect
record (an add prospect feature is not required), and have access put
the documents inserted in the subform into this?

Here is a screenshot of the form if it will help:
http://img35.exs.cx/img35/9764/eg1.jpg


Nov 13 '05 #2

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

Similar topics

2
4139
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 Groups - call them A to E. I'd like to generate a further automatic reference number based on something like Group/Unique ID so when I create a new record Access creates the Unique ID & I then enter in the group and then Access combines the two...
0
2131
by: tamilan71 | last post by:
Can anyone tell me a simple method of creating an application in Access 2003 that uses "Double data entry"? For me double data entry is defined as the ability to have data entered twice. The first entry is entered into the database, the second entry is checked against the previously entered data, discrepancies noted during second entry are communicated and during the second data entry there is an option to correct or accept either value....
2
5059
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 following. First, the data schema: Three tables are involved. The first is a PERSONS table which has two fields, SSNUMBER (primary key), and NAME.
2
2469
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my time field then this format gives the liberty to record times uptill a figure of 59 in different sub-formats, whereas i want the format to be able to record the times like 80:35 or 1:10 or 1138:00. which means that i have these many hours on a...
2
2137
by: Sethos | last post by:
I am sure that this has been covered, hashed, and rehashed, but a search on the group did not produce the answer, so forgive me if this seems like a "newbie" type question... Besically, I have a form on which the users can click on a button to add text boxes dynamically. That all works without a hitch. The problem comes in trying to verify the information in the boxes. Below is a very abbreviated example of the code I have in the form:
6
1932
by: Brian Blair | last post by:
I have created a input form that enters a number in a talble. If I open the form again it enters a new record instead of editing the existing record. It seems like it should be very basic but I see no way to do it other than a complicated macro.
3
7503
by: bosmatthews | last post by:
I have a main form with a subform and a second subform nested to the first subform. The data entry property for all three forms (main, subform and sub-subform) is set to "yes" because I am intending this form to be used for data entry only. The main form has a combo box from which the user can select a lake. The first subform allows the user to enter survey data for the lake. The sub-subform allows the user to enter additional (plant...
20
6929
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an "Outcomes Database" used to store response data from measures/ questionnaires for a longitudinal health study. It is essentially derived from Duane Hookom's Survey Database (thanks Duane!!!), with many modifications added to fit the needs of my lab.
1
2188
by: Data Entry Outsourcing | last post by:
Data Entry plays vital role in every business area. Data Entry is one such aspects of any business that needs to be handled properly for expanding your business. Data Entry is one of the leading elements for running a business successfully. Now Days it's a trend to outsource Data Entry Work to reliable service provider who provides excellent output out of their work. Many Companies or Organization prefer to outsource data entry work to...
0
1808
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 make any sense because it is a data entry form... am I missing something? Thanks.
0
9591
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, 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...
0
9425
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,...
0
10225
Oralloy
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...
0
10053
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 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...
1
7415
isladogs
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...
0
6676
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();...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
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
3
2816
bsmnconsultancy
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...

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.