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

how two forms can be synchronized

5 Nibble
Hi All
form1: table A with table B with many 2 many relations
form2 table A and table C with many 2 many relations

Can both forms be synchronized, e.g. when a record in form1 table A is selected form2 table A goes to the same record
Oct 14 '20 #1
7 4346
cactusdata
214 Expert 128KB
Yes. Set the Filter of form2 from the OnCurrent event of form1:

Expand|Select|Wrap|Line Numbers
  1. Dim Form As Form
  2.  
  3. Set Form = Forms("form2")
  4. Form.Filter = "ID = " & Me!ID.Value & ""
  5. Form.FilterOn = True
where ID is the primary key of table A.
Oct 15 '20 #2
twinnyfo
3,653 Expert Mod 2GB
gabril16,

Welcome to Bytes!

Are these two, separate, independent forms? Or is this a case of a form with a subform?

CactusData's solution will certainly work for two independent forms, but only if both forms are open.

If you have a subform configuration, simply establish the Parent Child relationship in the Subform's properties.

Hope that hepps.
Oct 15 '20 #3
gabril16
5 Nibble
Option Compare Database

Private Sub Form_Current()
Dim Form As Form
'form2=fmClientLogDtls2
'logDtlsID is primery key of table A
Set Form = Forms("fmClientLogDtls2")
Form.Filter = "ID = logDtlsID" & Me!ID.Value & ""
Form.FilterOn = True
End Sub
Oct 15 '20 #4
gabril16
5 Nibble
Can you please advice what's wrong with my code?
Oct 15 '20 #5
twinnyfo
3,653 Expert Mod 2GB
gabril,

Please tell us what is not working with your code. Are you receiving an error? If so, at what line?

Part of the problem may be in declaring a variable with the name of "Form" which is usually a reserved word and the DB may be getting confused by it.

Plus, it would be very helpful to know more about the structure of your tables/forms, as to whether you have a subform, or two open forms.

Thank you.
Oct 15 '20 #6
cactusdata
214 Expert 128KB
Try this:

Expand|Select|Wrap|Line Numbers
  1. Dim Form As Form
  2.  
  3. Set Form = Forms("fmClientLogDtls2")
  4. Form.Filter = "logDtlsID = " & Me!logDtlsID.Value & ""
  5. Form.FilterOn = True
Oct 15 '20 #7
gabril16
5 Nibble
Thank you all
Thank you cactusdata...it's working perfectly
Oct 21 '20 #8

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

Similar topics

2
by: Frank | last post by:
Hi, In the javadocs regarding many of the java.util classes, it states that the classes are not synchronized, and suggest using the Collections.synchronizedX(...) methods for getting...
2
by: yagish | last post by:
Hi Techies, Am really new with the Oracle 9i Forms and am searching for a way to perform Load Balancing in Oracle 9i Forms Application. Its not a J2EE application, so cannot go the OC4J way. I...
4
by: Rich Sienkiewicz | last post by:
Some classes, like Queue and SortedList, have a Synchronized method which gives a thread safe wrapper object for these classes. But the lock() statement does the same thing. Is there any rules as to...
8
by: ASP.Net programmer | last post by:
Hi, I have a few methods in a class that I want to synchronize (make sure they can't be used at the same time by multiple threads). As a Java programmer I just do this: public synchronized...
0
by: Dave Coate | last post by:
I am working on a generic way to launch multiple similar processes (threads) at once, but limit the number of threads running at any one time to a number I set. As I understand it the following...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
9
by: cellomt | last post by:
In Access 2003 I have a form that has synchronized combo box, linked by criteria in their separate queries. Example query criteria for combobox2: IIF(IsNull(!!), ,!!) thus limiting the...
0
FishVal
by: FishVal | last post by:
It is quite frequently needed to open an auxiliary form from a main one to enter some information. Data entered in the auxiliary form is expected to appear in the main one and optionally treated in...
12
by: Lnwolf | last post by:
Hello, I am having an issue with my synchronized combo boxes and don't know how to fix it. I have created two boxes and have made the synchronization work (the user clicks on the first box and...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
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
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...

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.