473,325 Members | 2,771 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,325 software developers and data experts.

Record Look Up

Hi All,

I have forms A, B, C and D all linked through various ID fields - A linked to B, B linked to C, C linked to D. I also have a command button on each form that closes the current form and opens the next.

How can I set up the forms so that when form B closes and form C opens, form C opens displaying the same ID record I was working with in from B?
Dec 27 '06 #1
5 2237
nico5038
3,080 Expert 2GB
In a similar case I used the tab control.
The forms can be placed as subforms and the tabs can be controlled like:
me.tabCTL.pages("first").visible = false
me.tabCTL.pages("second").visible = true
etc. with the pagename or relative like:
me.tabCTL.pages(1).visible = false
me.tabCTL.pages(2).visible = true
etc.

Idea ?

Nic;o)
Dec 27 '06 #2
In a similar case I used the tab control.
The forms can be placed as subforms and the tabs can be controlled like:
me.tabCTL.pages("first").visible = false
me.tabCTL.pages("second").visible = true
etc. with the pagename or relative like:
me.tabCTL.pages(1).visible = false
me.tabCTL.pages(2).visible = true
etc.

Idea ?

Nic;o)
Forgive me in advance if I complicate this. It's a good idea, but because I didn't disclose more details, it may not work. My apologies.

Forms are set up so that Form A also has Subform A1 attached (linked through an ID field). Subfrom A1 then becomes Main Form B on the next form. Main Form B has Subform B1 attached (linked through ID field). Subform B1 then becomes Main Form C on the next form. And so on.

As I move from "Main Form B/Subform B1" to Main Form C, How can I load Main Form C with the last record I used in Subform B1?

Otherwise, Main Form C load with the first record on file and I have to scroll to find the newest record I added. I hope this makes sense, and again my apologies.
Dec 27 '06 #3
nico5038
3,080 Expert 2GB
No problem, the tabbed control approach will also work for this scenario.
All you need is to place (hidden) textcontrols for every needed linking key.
Let's assume subformB has the OrderID to be linked to subformC.
Place a field txtOrderID on the mainform.
Add to subformB's OnCurrent event:
Parent.txtOrderID = Me.OrderID
Finally add txtOrderID as the Master Linkage field for the subformC and OrderID as the Child linkage field.
The subformB and subformC are now automatically synchronized.

Getting the idea ?

Nic;o)
Dec 27 '06 #4
No problem, the tabbed control approach will also work for this scenario.
All you need is to place (hidden) textcontrols for every needed linking key.
Let's assume subformB has the OrderID to be linked to subformC.
Place a field txtOrderID on the mainform.
Add to subformB's OnCurrent event:
Parent.txtOrderID = Me.OrderID
Finally add txtOrderID as the Master Linkage field for the subformC and OrderID as the Child linkage field.
The subformB and subformC are now automatically synchronized.


Getting the idea ?

Nic;o)
I think so. But just to be clear, Subform B has the OrderID to link to Main Form C - not sure if this makes a difference. Also, not sure what you mean by "SubformB's OnCurrent event." I can't find the OnCurrent event.

I test this out most of tonight post a reply tomorrow.
Dec 27 '06 #5
NeoPa
32,556 Expert Mod 16PB
I think so. But just to be clear, Subform B has the OrderID to link to Main Form C - not sure if this makes a difference. Also, not sure what you mean by "SubformB's OnCurrent event." I can't find the OnCurrent event.

I test this out most of tonight post a reply tomorrow.
In Design mode open Properties (Alt-Enter) then select the subform (Properties will show a Subform/Subreport item).
Now select the form that is in the subform (Properties should show as a Form now.) and look down the properties list. Under Tag you should see the On Current property. Set this to [Event Procedure] then click on the ... button at the right to create / switch to a new 'OnCurrent' event procedure.
Dec 30 '06 #6

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

Similar topics

2
by: BT3 | last post by:
I am trying to replace a single record in a flat file. The file is relatively small and no need for database. I open the file, and save the ftell() value in a variable. I read a record using...
5
by: Derek Cooper | last post by:
I hope you can help me. I posted this in the microsoft sql server newsgroup a few days ago and got no response so I thought I'd try here. If I can provide any clarification I'll be glad to do so....
3
by: Earl Teigrob | last post by:
I am considering writing a Class that Selects, Adds, Updates and Deletes Nodes in an XML File but do not what to reinvent the wheel. (See XML file below) That data format would emulate records...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
8
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record...
0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
4
by: windandwaves | last post by:
Hi Folk Is there anyone out there who knows if there is an easy way to highlight the currentrecord using conditional formatting or something like that in Access 2003? Thank Nicolaas
3
by: vanvee | last post by:
Hi I am trying to program a VB.Net Windows application (in a client server environment with multiple users) and am seeking some help about a possible technique to handle concurreny issues. I am...
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.