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

Record bookmarking

365 100+
Good evening Peeps

got another question....

OK, i have a continous form with tick boxes, the idea is that (currently a single record) is selected and then that record number is used in the openargs for another form which goes to the bookmark for that record.... with me so far??

I would like to know if it is possible to bookmark multiple record(ID's) and then skip through then on the second form?

if this is possible how would one accomplish this assuming i parse multiple "ID's" in the openargs seperated by commas or such like....

Hope this makes sense (does to me)

Thanks,

Dan

PS, just had an interim thought... what if i changed the record source into a query (on this opening) and used the parse in a query (WHERE IN), any alternatives? would that work?
Dec 8 '09 #1
11 1560
ChipR
1,287 Expert 1GB
I believe it would be easier to create a filter string from the selected records, and use that in the filter argument to the DoCmd.OpenForm.
Dec 8 '09 #2
Dan2kx
365 100+
could you point me in a direction for this, never used filters... any good literature would do, unless you are really bored and want to provide me with an example...

Dan
Dec 8 '09 #3
ChipR
1,287 Expert 1GB
I'm sorry, filter was the wrong term. I mean create a string to use in the WhereCondition, which would filter the records in the other form.
Dec 8 '09 #4
Dan2kx
365 100+
does it need to be formatted in a particular way? EG
Expand|Select|Wrap|Line Numbers
  1. Me.RandomID=1,2,3,4,5,6,7,8,9
Dec 8 '09 #5
ChipR
1,287 Expert 1GB
Yes, but you will be familiar with the syntax :)
From OpenForm Method [http://msdn.microsoft.com/en-us/libr...fice.10).aspx],
WhereCondition Optional Variant. A string expression that's a valid SQL WHERE clause without the word WHERE.
Dec 8 '09 #6
ChipR
1,287 Expert 1GB
Now, if you are using this to open a form showing only records that are checked, I suppose you will have to loop through records to create the string. Here's some quick pseudocode so you can see what I mean:
Expand|Select|Wrap|Line Numbers
  1. Sub cmdOpen_Click()
  2.   Dim strWhere As String
  3.   [loop through records that are checked]
  4.     strWhere = strWhere & "[PKField] = """ & record!field & """ OR "
  5.   [end loop]
  6.   If strWhere > "" Then
  7.     strWhere = Left(strWhere, Len(strWhere - 3))
  8.   End If
  9.   DoCmd.OpenForm "myOtherForm", , , strWhere
  10. End Sub
Dec 8 '09 #7
Dan2kx
365 100+
Can you use

............. , IN (1,2,3,4,5,6)

then??
Dec 8 '09 #8
ChipR
1,287 Expert 1GB
Quite possibly, but I haven't familiarized myself with the syntax for IN yet. The code would be very similar.
Dec 8 '09 #9
ChipR
1,287 Expert 1GB
Sorry, in that code it should have been
Expand|Select|Wrap|Line Numbers
  1. ..."[PKField] = """ & record!field & """ OR "
Going to edit that post, but wanted to point it out. Too much working on C++ lately.
Dec 8 '09 #10
Dan2kx
365 100+
i'll give it a whirl then, i like WHERE IN, it looks prettier and is much easier than constructing all the = OR stuff, its basicaly the same

If using in SQL (from query builder) as a where clause simply

IN (LIST,LIST,,,,,,,) etc

very good!!

Thanks for the help, and so speedy too!!!
Dec 8 '09 #11
Dan2kx
365 100+
New Question



Dan
Dec 8 '09 #12

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

Similar topics

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...
1
by: Lumpierbritches | last post by:
Thank you in advance for all of your patience and assistance. It is greatly appreciated. I know there's a way to bookmark a record in code, but for the life of me can't remember it, nor can I...
3
by: vMike | last post by:
Is there a way to adjust the url of the bookmark value when someone wants to bookmark a page. When a user tries to bookmark a page they get the non-postback state of the page. I can use code to...
2
by: chazmanian | last post by:
We have some link buttons that allow the user to "view" a PDF file. That is, the link runs server-side code that generates the virtual path to the PDF file in question and then does a...
3
by: Grumps | last post by:
Im trying to build a bookmarking feature with ajax and everything has work until i come across the callback problem. document.getElementById during stateChanged Im trying to make possible...
0
rhitam30111985
by: rhitam30111985 | last post by:
hi there.. i am new to this network and also new to python programming.. i have been assigned the task to figure out how exactly social bookmarking is done but have no idea.. dunno where to start......
2
by: glynester | last post by:
I have some code that works off the update event of a textbox field (which is a part of a record in a continuous form). If certain conditions are met (following the updating of the field), I want a...
8
by: Dan2kx | last post by:
New question.... I have my continous form constructed of data from a query, i want to select records to edit (See thread) using unbound tickboxes, how can i link these? Thanks (again), Dan
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?
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
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,...
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...
0
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...
0
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...
0
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...

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.