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

open pop up form to specific record or create new record

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
fmcriteria

Tbuilding stores basic building data, while Tcriteria stores specific data for some, but NOT ALL, buildings. The two tables are linked through the building ID number(TrusteeID), which is the key in Tbuilding

I would like to create a command button in fmbuilding that opens fmcriteria as a “pop-up” form (not subform, I know it would be easier but need “pop-up” for other reasons, not programming related). I need the “pop-up” form to open to the specific record of the building currently displayed in fmbuilding. I have been able to do this so far with DoCmd.OpenForm and stLinkCriteria, however, if a building does not have a record in fmcriteria, I would need to create a new record in tcriteria and I have been having trouble getting there.

In other words, could I have the command button in fmbuilding open fmcriteria to the current record and if record does not exist go to a blank record using the new TrusteeID so the user can enter the data?

I have not used VBA very much so I am new to this level of design. Please, any help would be greatly appreciated.

I am using Access 2003

Thanks
Aug 29 '08 #1
1 6515
NeoPa
32,556 Expert Mod 16PB
I think the concept here is fairly straightforward. From your question you seem to understand the concepts well enough, so I'll pitch my answer for what I think you can grasp. If anything's confusing though, or you need more direction to either understand or implement this then just say so.

What you need, should be simply to open [fmCriteria] from the CommandButton passing a filter in the DoCmd.OpenForm call.

The form will open with the correct record displayed if one exists, otherwise it will open on the New Record slot.

If it's important to set any values in this record so that it matches what you need then that also can be managed, but you don't say what, if any, fields this might apply to.
Aug 29 '08 #2

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

Similar topics

55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
2
by: XxLicherxX | last post by:
Hi, Can someone tell me how I can open a form to a specific record from a button on another form. Here is what I want to have happen. I have one form called Computers and another form called...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
12
by: Orchid | last post by:
Hello all, I have different version of reports which used for different months. For example, I am using report version 1 up to September, but we have some design changes on the report for October,...
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
3
by: kev | last post by:
Hi folks, I have a form for registration (frmRegistration) whereby i have two buttons. One is Save which saves record using the OnClick property. I used wizard to create the save button. The...
9
by: mtgrizzly52 | last post by:
Hi all, I've looked for an answer for this in lots of books, online in several discussion groups and have not found the answer which I feel may be very simple. What I want to do is have a...
5
by: BD | last post by:
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one...
3
by: DavidB | last post by:
I want to be able to go to a specific record on my form when I open it. The record I want to go to will be dynamic based on the value currently stored in a global variable. The global contains...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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.