473,660 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing the New entry portion of an access form

Ok, so I have a Form. It is a continuous form.

In the header one selects what person to view data for. Once the
person is selected, the travel information that has been budgeted for
the year associated with that person appears below (this is a 3 table,
many to many: people travel to locations).

The final line of the continuous form is to add new data. I start
typing in the name of the destination, and it autocompletes the name
if it's there (if it's not, I'm planning on bringing it to the
attention of the user via dialog box and then adding it to the
location table if necessary, but I've not started on that yet). How
can I easily grab the primary key for that name and then set in the
new record. Where is that new record located?
tony
Nov 13 '05 #1
3 1516
Since the name is auto-completing, I'm assuming you're using a combo box. If
so, to bring in the PersonID, add a column to the combo box. In the Row
Source of the combo box, add the PersonID field to the query, this will add
the column. Increase the Column Count property by 1 and set the Bound Column
to the column that PersonID is in. This last step will cause the PersonID to
be stored in the form's table instead of the person's name. Set the Column
Widths property to 0 for the column that PersonID is in so that the user
doesn't see the ID field. Set Limit To List to Yes. Use the Not In List
event to add a new person to the Person table if the user enters someone who
isn't in the list.

--
Wayne Morgan
Microsoft Access MVP
"tony bergstrom" <mo******@hotma il.com> wrote in message
news:b9******** *************** ***@posting.goo gle.com...
Ok, so I have a Form. It is a continuous form.

In the header one selects what person to view data for. Once the
person is selected, the travel information that has been budgeted for
the year associated with that person appears below (this is a 3 table,
many to many: people travel to locations).

The final line of the continuous form is to add new data. I start
typing in the name of the destination, and it autocompletes the name
if it's there (if it's not, I'm planning on bringing it to the
attention of the user via dialog box and then adding it to the
location table if necessary, but I've not started on that yet). How
can I easily grab the primary key for that name and then set in the
new record. Where is that new record located?
tony

Nov 13 '05 #2
Using the personID is not a problem right now. When I said name
before, I meant to be referring to the name of the destination. It was
still the same idea though. Sorry, for the confusion.

Actually, it is a text box. Though, I tried changing it to a combo
box for the suggestion. It will not let me set "Limit to list" to no,
as long as the bound column (primary Key) is not visible (width = 0).

Will something along the lines of Me.Recordset.ge tLast or something
get me in the right place to access the incoming data?

It may be important to note, the names of the destination are not
unique. There may be multiple entries for different fiscal years with
different information.
tony

"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message news:<Aj******* ****@newssvr33. news.prodigy.co m>...
Since the name is auto-completing, I'm assuming you're using a combo box. If
so, to bring in the PersonID, add a column to the combo box. In the Row
Source of the combo box, add the PersonID field to the query, this will add
the column. Increase the Column Count property by 1 and set the Bound Column
to the column that PersonID is in. This last step will cause the PersonID to
be stored in the form's table instead of the person's name. Set the Column
Widths property to 0 for the column that PersonID is in so that the user
doesn't see the ID field. Set Limit To List to Yes. Use the Not In List
event to add a new person to the Person table if the user enters someone who
isn't in the list.

--
Wayne Morgan
Microsoft Access MVP
"tony bergstrom" <mo******@hotma il.com> wrote in message
news:b9******** *************** ***@posting.goo gle.com...
Ok, so I have a Form. It is a continuous form.

In the header one selects what person to view data for. Once the
person is selected, the travel information that has been budgeted for
the year associated with that person appears below (this is a 3 table,
many to many: people travel to locations).

The final line of the continuous form is to add new data. I start
typing in the name of the destination, and it autocompletes the name
if it's there (if it's not, I'm planning on bringing it to the
attention of the user via dialog box and then adding it to the
location table if necessary, but I've not started on that yet). How
can I easily grab the primary key for that name and then set in the
new record. Where is that new record located?
tony

Nov 13 '05 #3
I seem to have found something that works. On the Lost Focus event of
the field in question, Im just doing Me.Fieldname (where Fieldname is
the name of the field I want) and it seems to be returning the data of
whatever record is being worked on. From that, Im making a query in
vb to get the key.

I haven't gotten to the inserting part yet, just the getting and
checking of data
tony

mo******@hotmai l.com (tony bergstrom) wrote in message news:<b9******* *************** ****@posting.go ogle.com>...
Ok, so I have a Form. It is a continuous form.

In the header one selects what person to view data for. Once the
person is selected, the travel information that has been budgeted for
the year associated with that person appears below (this is a 3 table,
many to many: people travel to locations).

The final line of the continuous form is to add new data. I start
typing in the name of the destination, and it autocompletes the name
if it's there (if it's not, I'm planning on bringing it to the
attention of the user via dialog box and then adding it to the
location table if necessary, but I've not started on that yet). How
can I easily grab the primary key for that name and then set in the
new record. Where is that new record located?
tony

Nov 13 '05 #4

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

Similar topics

2
1837
by: Suzanne Boyle | last post by:
I have some javascript code in my page that calls the document.getElementById method. This usually works fine however in IE 6, after I have downloaded a file using the File Download dialog, I get an unspecified error. After a bit of testing I have found that whenever I try to access 'document' this error occurs but only when the page is within a frame. Does anyone know why this would be happenning?
9
1908
by: Swami | last post by:
I was wondering how I can programmatically find out the path of an installed program. I have an application that needs access to a config file that resides in the folder of another application. I'm guessing that this can be done by accessing the registry, but some articles or sample code would be useful. Thanks.
1
1392
by: Raffle | last post by:
Hi all, I'm still fairly new to Access and I was hoping to get some assistance with something I have yet to accomplish. The desired result is a form where users can enter data but for a few select fields, the data that is available to be entered is filtered based on a selection made in another field. Right now, I have a table created for the form where customer information & payment information are standard text fields. There is
4
1857
by: Sean Connery | last post by:
I have a Microsoft UI Process Application Block that is controlling child forms in an MDI parent container. The views node in the app.config file has been set to stayOpen=false. Because there are a series of data entry forms using ONLY the numeric key pad, certain keys on this pad have been configured to behave as "function keys". In order for this to happen, I have implemented the IMessageFilter interface to intercept messages in the...
1
3119
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created elements and would like to seek a solution for this. I had looked through several articles for accessing programatically-created dynamic elements such as: 1)
6
3669
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as development of reports, it is certainly fine in my book. But for end-users, with little experience or training, it would be nice to have an easy way to handle various selection criteria, perhaps with relatively stock reports. I see easy to use by...
2
5050
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.
4
3622
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if possible.. for example..i hav a menu in the parent form named "Administrator" whic has an item "mnuLogIn"..now when i click on login..another child form named "frmLogIn" is displayed..what i want to happen is this: when login form(frmLogIn) is...
7
3802
by: Chuck Anderson | last post by:
I'm pretty much a JavaScript novice. I'm good at learning by example and changing those examples to suit my needs. That said .... ..... I have some select fields in a form I created for a database search that I am unable to figure out how to access. (The search is implemented in Php/MySQL.) The user enters search values for: name, address1, city, .... etc., ..... and for each of these they also select whether the search should...
0
8428
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
8341
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
8851
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
8630
tracyyun
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...
1
6181
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
5650
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
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1740
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.