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

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 1484
On Tue, 1 May 2007 02:25:38 +0100, "John" <Jo**@nospam.infovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClone
.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.infovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClone
.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**********@yahoo.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.infovis.co.uk>
wrote:

The list control should be unbound.

In its AfterUpdate event write:

With Me.RecordsetClone
.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_AfterUpdate()
if (not isnull(me!cmbUserinput)) then
me.recordsetclone.findfirst "targetfield=" & str(cmbUserinput.Value)
if (not me.recordsetclone.nomatch) then
me.bookmark = me.recordsetclone.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
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: >>>...
14
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
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...
2
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. ...
1
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...
3
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...
1
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 ;-...
8
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...
10
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...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.