473,657 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Synching list with fields

Hi

I have a form which is bound to a query with some bound controls. On the
same form I also have a list bound to the same query. How can I sync the
controls on the form with the list such that when a list item is selected by
user the controls on the form move to the same record?

Thanks

Regards
May 1 '07 #1
4 1508
On Tue, 1 May 2007 02:25:38 +0100, "John" <Jo**@nospam.in fovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClo ne
.FindFirst "[ID] = " & Me![myListControl]
Me.Bookmark = .Bookmark
End With

-Tom.

>Hi

I have a form which is bound to a query with some bound controls. On the
same form I also have a list bound to the same query. How can I sync the
controls on the form with the list such that when a list item is selected by
user the controls on the form move to the same record?

Thanks

Regards
May 1 '07 #2
I agree with Tom. You need the fields on the form to be "Unbound" or
not linked to any fields in any table/query.

But since I'm fairly new to Access and I don't know much VBA yet, I
do the population of the "Unbound" fields a bit different. So I would
do it the way Tom describes below.

On Apr 30, 7:49 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
On Tue, 1 May 2007 02:25:38 +0100, "John" <J...@nospam.in fovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClo ne
.FindFirst "[ID] = " & Me![myListControl]
Me.Bookmark = .Bookmark
End With

-Tom.
Hi
I have a form which is bound to a query with some bound controls. On the
same form I also have a list bound to the same query. How can I sync the
controls on the form with the list such that when a list item is selected by
user the controls on the form move to the same record?
Thanks
Regards- Hide quoted text -

- Show quoted text -

May 2 '07 #3
On 2 May 2007 09:45:12 -0700, vi**********@ya hoo.com wrote:

I disagree with villareal68. For my code to work the form must be
bound. ONLY the list control should be unbound.

As a rookie you should probably not work with unbound forms. It's not
what Access is primarily designed to do. If you go unbound, you better
have a good reason, and more than beginners knowledge of VBA.

-Tom.
>I agree with Tom. You need the fields on the form to be "Unbound" or
not linked to any fields in any table/query.

But since I'm fairly new to Access and I don't know much VBA yet, I
do the population of the "Unbound" fields a bit different. So I would
do it the way Tom describes below.

On Apr 30, 7:49 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
>On Tue, 1 May 2007 02:25:38 +0100, "John" <J...@nospam.in fovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClo ne
.FindFirst "[ID] = " & Me![myListControl]
Me.Bookmark = .Bookmark
End With

-Tom.
>Hi
>I have a form which is bound to a query with some bound controls. On the
same form I also have a list bound to the same query. How can I sync the
controls on the form with the list such that when a list item is selected by
user the controls on the form move to the same record?
>Thanks
>Regards- Hide quoted text -

- Show quoted text -
May 3 '07 #4
Private Sub cmbUserinput_Af terUpdate()
if (not isnull(me!cmbUs erinput)) then
me.recordsetclo ne.findfirst "targetfiel d=" & str(cmbUserinpu t.Value)
if (not me.recordsetclo ne.nomatch) then
me.bookmark = me.recordsetclo ne.bookmark
else
msgbox "No record found..."
end if
end if
end sub

--A--

On 01.05.2007 03:25, John wrote:
Hi

I have a form which is bound to a query with some bound controls. On the
same form I also have a list bound to the same query. How can I sync the
controls on the form with the list such that when a list item is selected by
user the controls on the form move to the same record?

Thanks

Regards

Nov 12 '07 #5

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

Similar topics

7
3834
by: Greg Brunet | last post by:
I'm writing some routines for handling dBASE files. I've got a table (DBF file) object & field object already defined, and after opening the file, I can get the field info like this: >>> tbl.Fields() What I would like to do is be able to extract the field names into a single, separate list. It should look like:
14
2006
by: john | last post by:
I have the following s = "spot" which I would like to change to a list l = I have tried l = eval(s) but I get the error
13
2646
by: TB | last post by:
Hi, Is there an elegant way to assign to a list from a list of unknown size? For example, how could you do something like: >>> a, b, c = (line.split(':')) if line could have less than three fields? Thanks, TB
2
2102
by: | last post by:
I am hoping a mixed ASP- Javascript programmer could help me with this scenario: I have a list box populated with randomized records (NewID()) from a Broker (Salesperson) sql server table. Each time the user selects one of the broker items I need to display a Image of the broker in the table cell next to it. I have found a number of online js scripts that use the image selector route
1
2366
by: John | last post by:
Hi We have an access db which records daily orders. We would like the orders to be downloaded to a windows mobile 2003 device via usb cradle. Drivers then take along the device and get signatures from customers when items delivered. Once drivers are back, the information to be synched back to the access db as drivers may have amended the order detail. How does one go about synching to/from mobile device? Are there any code examples...
3
2062
by: Amp Inthalangsy | last post by:
Hi there, Was hoping someone would have an fix for me or some kind or work around. I was able to get my client side dynamic dependent list box working but if my child list data has double quotes or hard breaks as values it wont work at all and I am getting a "underterminated string constant" error. If anyone can help please email me at: ainthalangsy@pembinatrails.ca thanks in andvance
1
2006
by: Arun | last post by:
Hi Group, I was trying to link a combo box with a list control and having some trouble with that. Could anyone please help me with that. Here's the example of the scenario. Combo Box ;- Country_Names (Pulls values from the country table(Just the country_name value)) (Each country will have a table by itself, For Example USA will be a
8
2282
by: Andre Meyer | last post by:
Hi all os.walk() is a nice generator for performing actions on all files in a directory and subdirectories. However, how can one use os.walk() for walking through two hierarchies at once? I want to synchronise two directories (just backup for now), but cannot see how I can traverse a second one. I do this now with os.listdir() recursively, which works fine, but I am afraid that recursion can become inefficient for large hierarchies. ...
10
1636
by: Rick | last post by:
VS 2005 I have a class of BindingList(of T) to use as a datasource for a lookup combobox. The combobox is to lookup the Terms for a Purchase Order. When I implement this on my Winform, the combobox does not synch with the underlying data, i.e. the Terms description does not show for the terms number. The combobox does show the Descriptions in the drop-down box, so they are
0
8420
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
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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
6176
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
5642
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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.