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

Open form to a specific Record, but show all records

I am new to Access, I am more familiar with FileMaker but wanted to keep with software that we have. I have a list of software, I want to set it up so that if I click a record in the list it will go to that particular software title's form layout. I can do this where it shows *ONLY* the particular record, but I am looking for it to basically navigate to the selected software form, but still allows you to navigate through *ALL* other software titles in the form view. If you can help me figure this out in easy to understand terms *newby*, I'd be greatly appreciative!
May 20 '14 #1

✓ answered by jimatqsi

What's going on here is that you are opening one form from another form and then kind of moving that opened form to a specific record sort of like by remote control. It looks just fine like that without knowing anything about the operating environment or specific needs of the user. You would do well to study what you have done and what the other link is demonstrating - 3 ways to advance to a record. That link is not about controlling one from from another, it's simply demonstrating moving around within a recordset. Within the active form or another form is kind of beside the point.

Glad you solved your problem.

jim

Jim

5 7097
jimatqsi
1,271 Expert 1GB
jucream,
Welcome to Bytes. As a newby to Access, you'll want to spend some time with the Northwind sample database. Check under your Access Help menu to find that.

As for your immediate need, see this thread, #3. http://bytes.com/topic/access/insigh...ogrammatically

You're going to want to put your record navigation in the OnOpen even of the form. So it will open with the entire recordset but then the code will just advance you to the record you specify.

Good luck, and let us know how you make out. We're here to help.

Jim
May 20 '14 #2
Thank you, jimatqsi! I actually just figured out how to open the Northwind database that has 'Design View' so that will be super helpful.

I didn't quite understand the info in the links, but it directed me to refine my searching and I came up with something that is working. Is there any negative to using this as opposed to the info on your link, it seems to be working as I hoped, I just want to make sure it doesn't break down the road?

Expand|Select|Wrap|Line Numbers
  1. Private Sub ID_Click()
  2.  
  3. On Error GoTo Err_Go_to_Click
  4.  
  5. Dim stDocName As String
  6. Dim stLinkCriteria As String
  7.  
  8. stLinkCriteria = "ID = " & Me.ID
  9. stDocName = "Software"
  10. 'Open the form with no filter
  11. DoCmd.OpenForm "Software"
  12. 'Go to the specified record
  13. Forms(stDocName).Recordset.FindFirst stLinkCriteria
  14.  
  15. Exit_Go_to_Click:
  16.     Exit Sub
  17.  
  18. Err_Go_to_Click:
  19.     MsgBox Err.Description
  20.     Resume Exit_Go_to_Click
  21.  
  22.  
  23. End Sub
May 20 '14 #3
jimatqsi
1,271 Expert 1GB
What's going on here is that you are opening one form from another form and then kind of moving that opened form to a specific record sort of like by remote control. It looks just fine like that without knowing anything about the operating environment or specific needs of the user. You would do well to study what you have done and what the other link is demonstrating - 3 ways to advance to a record. That link is not about controlling one from from another, it's simply demonstrating moving around within a recordset. Within the active form or another form is kind of beside the point.

Glad you solved your problem.

jim

Jim
May 20 '14 #4
Thanks Jim! That is what I was looking for, I have a list of software, when choosing from the list I wanted it to open to a form view and display that particular software title (what was clicked on) but still allow the user to navigate amongst the other software titles within the form view. I am trying to come up with an easier method of tracking software licenses and installations for my department as the current spreadsheet method is getting out of hand and hard to follow. It'll be used by a couple of us and probably no more than 1 person at a time.
May 20 '14 #5
NeoPa
32,556 Expert Mod 16PB
Simply-put, controlling record navigation within a form involves the following steps (although there may be alternative approaches) :
I assume that we start from a point where information that identifies the required record uniquely is available to us from the start.
  1. When the form (We'll refer to this object as {Form}.) is open we use code to navigate to the required record in {Form}.RecordsetClone. {Form}.Recordset could be used but doesn't allow so easily for any error handling (Not included here).
  2. We'll refer to the identifying info as strID and the Field that stores the data to be matched as [ID]. I've assumed for the purpose of this snippet that the ID data is textual. See Quotes (') and Double-Quotes (") - Where and When to use them for handling other data types in SQL literals.
  3. Expand|Select|Wrap|Line Numbers
    1. Dim strWhere As String, strBM As String
    2. strWhere = Replace("[ID]='%I'", "%I", strID)
    3. Call {Form}.RecordsetClone.FindFirst(Criteria:=strWhere)
    4. ' Error handling may go here.
    5. {Form}.Recordset.Bookmark = {Form}.RecordsetClone.Bookmark
May 25 '14 #6

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

Similar topics

1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
2
by: nkoske | last post by:
I have a form with a subform in datasheet view and I have a event on one of the fields in the subform, so that the user can double click it and go to expanded information based on that field. ...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
3
by: kev | last post by:
Hi folks, I have a form for registration (frmRegistration) whereby i have two buttons. One is Save which saves record using the OnClick property. I used wizard to create the save button. The...
14
by: keri | last post by:
Hi, Simple version of the question..... How do I use the where clause of the open form command to show an account with a matching ID to be displayed when the form is opened? Eg. I select a...
3
by: DavidB | last post by:
I want to be able to go to a specific record on my form when I open it. The record I want to go to will be dynamic based on the value currently stored in a global variable. The global contains...
3
by: gismar | last post by:
hi! i'm at a loss here. after creating my form, I added data to it and the next time I started access, it did not show any of the records- they are still in the table but are not shown!! I...
1
by: aaron knezevic | last post by:
I'm attempting to open an access file, form and go to a specific record from an autocad drawing. using excell and creating a macro I've gotten as far as to get the form open but can't get to the...
2
by: ritesh272004 | last post by:
Hi, I have a sub form in my application and i am trying to change the recordsource property by the attached code lines. There are two tables : TblInvDet & TblItemMast The problem here is if...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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.