473,387 Members | 1,465 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.

Opening a form to a specific record

I have a form where my user can enter in basic information. I have a button the user presses to save the record, close the form, and open up another form to the most recent record where the user can enter in more detailed data about the record.

This approach works just fine in a single user input situation. However, if I have multiple users doing data input this causes some issues.

For Example:

User A begins the basic input. User A assigns the records primary key (#1) with the first keystroke entered. User B begins to input, assigning a new primary key (#2) to the new record. User A finishes the basic input and presses the button saving the record and opening the second form for more detailed entry. As the second form takes you last record enterend, the record displayed for user A has the primary key of #2. This is not the record User A started with but is the record being prepared by User B.

Essentially, what I'm looking to do is, capture the value of the primary key close the first form and open the second form where the primary key is equal to the capture value.

Any ideas?

Thanks for taking the time to read my post.
Jan 7 '12 #1
2 1284
Mihail
759 512MB
If I understand Ok, both forms are bounded to the same table.
An answer to your problem can be to save the primary key into a global variable and use that variable in the open event for the second form. But I think that is not the best approach.

Open the second form without close the first one.
Just hide it.
Then use the filter to open the second form to the desired record.
Jan 8 '12 #2
NeoPa
32,556 Expert Mod 16PB
Opening the second form with a filter that specifies that the [ID] field match the value of the ID from the first form would be the easiest way to proceed. You can also pass the value as an OpenArgs parameter of the DoCmd.OpenForm() call.
Jan 8 '12 #3

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

Similar topics

1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
2
by: nkoske | last post by:
I have a form with a subform in datasheet view and I have a event on one of the fields in the subform, so that the user can double click it and go to expanded information based on that field. ...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
3
by: cmp80 | last post by:
I have a database that I am using to store student data. There are two tables and two forms to display the data: Tables tbStudent tbRE Forms fmStudent fmRE
2
by: Jpipher | last post by:
Let me explain what I am trying to accomplish... Two forms -- we'll call them "Main" and "Related" A command button on "Main" runs a union query. The union query results are shown in "Related"...
2
by: rousseaud | last post by:
I have a continuous form, frmA, that lists certain record fields from tblB. I want to be able to click on one of the records in frmA (just an on click event on one of the form fields) and have that...
7
by: mahgnilla | last post by:
Hi, I was wondering if anyone could help?! I have a button on one form (Participant form) that opens another form at a specific record (Learning Session form with specific session for that...
1
by: Martin Bentler | last post by:
Right now, I have a form, locked records, on which I have a CommandButton that opens a second form (much like the first) but open for editing, plus allowing the user to manipulate other areas of the...
11
by: casan.mike | last post by:
Hi all, I have a form called "customer_frm" with many records in it. I would like to have a form that has a combobox listing all the customers, and a button that open the "customers_frm" to...
1
by: cvillav | last post by:
Hello, I am new to Access and this forums, I have two tables and two forms to display the data. Tables Tbuilding Tcriteria Forms fmbuilding
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?
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
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,...
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.