Senin, 22 Februari 2021

[MSAccessProfessionals] Tips and Shortcuts for beginning Access Developers

Tomorrow, Tuesday Feb 23, at 12 noon Central Time, is Part 2 of Tips and
Shortcuts for beginning Access Developers with Maria Barnes and me.

https://accessusergroups.org/lunch/event/access-lunchtime-3-2021-02-23/

This is a free online user group meeting for anyone who is interested in
Access. We welcome all, from beginner to experts who help answer chat
questions and fill in gaps that we miss. It will be fun, join  us.

Hopefully Duane will be there again too. Last time, he answered chat
questions and reminded us of things we forgot to say!

In case you missed Part 1, or want a refresher, here is a recording of
that meeting. Hope you can join us.

https://www.youtube.com/watch?v=5hf6qX0kBgA

kind regards,
crystal



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115858): https://groups.io/g/MSAccessProfessionals/message/115858
Mute This Topic: https://groups.io/mt/80842351/3568969
Group Owner: MSAccessProfessionals+owner@groups.io
Unsubscribe: https://groups.io/g/MSAccessProfessionals/leave/6606618/577250336/xyzzy [sugeng.panjalu.access@blogger.com]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID

The code below can easily be adapted to work on the same form instead of opening another.  You can also try the combo box wizard and choose the third option, "Find a record...".  You'll only see that option if the form is bound to a table though, if memory serves.  The wizard will use a bookmark as well, or at least it used to.


Paul

------ Original Message ------
From: "Dave Williams" <davewillgmale@gmail.com>
Sent: 2/22/2021 4:01:09 PM
Subject: Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID

Jim,

That looks very simple but I don't see the relevance to my problem. I don't want to open another form, which would open at its first record. I just want to change the record already being displayed by my form.

Regards,
Dave

On 22/02/2021 22:36, Jim Wagner wrote:
Dave,

I created this solution a long time ago but it works. 
I have a form with mini subforms that break out tasks sort of like a card in task apps. when i click on the TaskId in one of the suborms a macro is executied

If IsNull([TaskID])
Beep
End If

If Not IsNull([TaskID])

OpenForm
form Name "name of the form goes here"
view  Form
Where Condition  =="[TaskID]=" & [TaskID]
 windows mode Normal

End if

OnError
Go to Next
Macro Name
Requery
Control Name

hope that gives you some ideas or an approach

good luck

Jim Wagner



From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Dave Williams <davewillgmale@gmail.com>
Sent: Monday, February 22, 2021 2:44 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: [MSAccessProfessionals] How to make a form go to a record with a particular ID
 
I have created a form to display photos from various folders on my PC. The record source is a table as follows:
Name: Photos
Field Name, Data Type
ImageID, Autonumber
Folder, Text
Photo, Text
It contains 100 records e.g.
38, 14/07/2018, 13880718, PICT0001.JPG

This works fine when using the normal navigation buttons, but as there are so many records I have added a list box containing the years, each with the appropriate starting record ID, contained in a table as follows:

Name: FirstPhotoOfYear
Field Name, Data Type
Year, Text
1st photo ID, Number

5 records e.g.
2018, 38

So when I select 2018 in the list box, I want to make the form show the record with ID = 38. I thought it might help to add a text box (called Text13) on the form that shows the ID number produced by the list box (called List11). This shows the ID fine, using a suitable expression as its control source.
In code which operates when the list box is updated, I first use Text13.Requery, followed by DoCmd.FindRecord but without success. I don't know how to make it search just the ID field, or even if it's found anything, as the form does not change to a new record.

I await suggestions.
.








Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID

Dave,

sorry I misread that. 

JIm

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Dave Williams <davewillgmale@gmail.com>
Sent: Monday, February 22, 2021 5:01 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID
 
Jim,

That looks very simple but I don't see the relevance to my problem. I don't want to open another form, which would open at its first record. I just want to change the record already being displayed by my form.

Regards,
Dave

On 22/02/2021 22:36, Jim Wagner wrote:
Dave,

I created this solution a long time ago but it works. 
I have a form with mini subforms that break out tasks sort of like a card in task apps. when i click on the TaskId in one of the suborms a macro is executied

If IsNull([TaskID])
Beep
End If

If Not IsNull([TaskID])

OpenForm
form Name "name of the form goes here"
view  Form
Where Condition  =="[TaskID]=" & [TaskID]
 windows mode Normal

End if

OnError
Go to Next
Macro Name
Requery
Control Name

hope that gives you some ideas or an approach

good luck

Jim Wagner



From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Dave Williams <davewillgmale@gmail.com>
Sent: Monday, February 22, 2021 2:44 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: [MSAccessProfessionals] How to make a form go to a record with a particular ID
 
I have created a form to display photos from various folders on my PC. The record source is a table as follows:
Name: Photos
Field Name, Data Type
ImageID, Autonumber
Folder, Text
Photo, Text
It contains 100 records e.g.
38, 14/07/2018, 13880718, PICT0001.JPG

This works fine when using the normal navigation buttons, but as there are so many records I have added a list box containing the years, each with the appropriate starting record ID, contained in a table as follows:

Name: FirstPhotoOfYear
Field Name, Data Type
Year, Text
1st photo ID, Number

5 records e.g.
2018, 38

So when I select 2018 in the list box, I want to make the form show the record with ID = 38. I thought it might help to add a text box (called Text13) on the form that shows the ID number produced by the list box (called List11). This shows the ID fine, using a suitable expression as its control source.
In code which operates when the list box is updated, I first use Text13.Requery, followed by DoCmd.FindRecord but without success. I don't know how to make it search just the ID field, or even if it's found anything, as the form does not change to a new record.

I await suggestions.
.








Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID

Jim,

That looks very simple but I don't see the relevance to my problem. I don't want to open another form, which would open at its first record. I just want to change the record already being displayed by my form.

Regards,
Dave

On 22/02/2021 22:36, Jim Wagner wrote:
Dave,

I created this solution a long time ago but it works. 
I have a form with mini subforms that break out tasks sort of like a card in task apps. when i click on the TaskId in one of the suborms a macro is executied

If IsNull([TaskID])
Beep
End If

If Not IsNull([TaskID])

OpenForm
form Name "name of the form goes here"
view  Form
Where Condition  =="[TaskID]=" & [TaskID]
 windows mode Normal

End if

OnError
Go to Next
Macro Name
Requery
Control Name

hope that gives you some ideas or an approach

good luck

Jim Wagner



From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Dave Williams <davewillgmale@gmail.com>
Sent: Monday, February 22, 2021 2:44 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: [MSAccessProfessionals] How to make a form go to a record with a particular ID
 
I have created a form to display photos from various folders on my PC. The record source is a table as follows:
Name: Photos
Field Name, Data Type
ImageID, Autonumber
Folder, Text
Photo, Text
It contains 100 records e.g.
38, 14/07/2018, 13880718, PICT0001.JPG

This works fine when using the normal navigation buttons, but as there are so many records I have added a list box containing the years, each with the appropriate starting record ID, contained in a table as follows:

Name: FirstPhotoOfYear
Field Name, Data Type
Year, Text
1st photo ID, Number

5 records e.g.
2018, 38

So when I select 2018 in the list box, I want to make the form show the record with ID = 38. I thought it might help to add a text box (called Text13) on the form that shows the ID number produced by the list box (called List11). This shows the ID fine, using a suitable expression as its control source.
In code which operates when the list box is updated, I first use Text13.Requery, followed by DoCmd.FindRecord but without success. I don't know how to make it search just the ID field, or even if it's found anything, as the form does not change to a new record.

I await suggestions.
.








Re: [MSAccessProfessionals] How to make a form go to a record with a particular ID

Dave,

I created this solution a long time ago but it works. 
I have a form with mini subforms that break out tasks sort of like a card in task apps. when i click on the TaskId in one of the suborms a macro is executied

If IsNull([TaskID])
Beep
End If

If Not IsNull([TaskID])

OpenForm
form Name "name of the form goes here"
view  Form
Where Condition  =="[TaskID]=" & [TaskID]
 windows mode Normal

End if

OnError
Go to Next
Macro Name
Requery
Control Name

hope that gives you some ideas or an approach

good luck

Jim Wagner



From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Dave Williams <davewillgmale@gmail.com>
Sent: Monday, February 22, 2021 2:44 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: [MSAccessProfessionals] How to make a form go to a record with a particular ID
 
I have created a form to display photos from various folders on my PC. The record source is a table as follows:
Name: Photos
Field Name, Data Type
ImageID, Autonumber
Folder, Text
Photo, Text
It contains 100 records e.g.
38, 14/07/2018, 13880718, PICT0001.JPG

This works fine when using the normal navigation buttons, but as there are so many records I have added a list box containing the years, each with the appropriate starting record ID, contained in a table as follows:

Name: FirstPhotoOfYear
Field Name, Data Type
Year, Text
1st photo ID, Number

5 records e.g.
2018, 38

So when I select 2018 in the list box, I want to make the form show the record with ID = 38. I thought it might help to add a text box (called Text13) on the form that shows the ID number produced by the list box (called List11). This shows the ID fine, using a suitable expression as its control source.
In code which operates when the list box is updated, I first use Text13.Requery, followed by DoCmd.FindRecord but without success. I don't know how to make it search just the ID field, or even if it's found anything, as the form does not change to a new record.

I await suggestions.
.







[MSAccessProfessionals] How to make a form go to a record with a particular ID

I have created a form to display photos from various folders on my PC. The record source is a table as follows:
Name: Photos
Field Name, Data Type
ImageID, Autonumber
Folder, Text
Photo, Text
It contains 100 records e.g.
38, 14/07/2018, 13880718, PICT0001.JPG

This works fine when using the normal navigation buttons, but as there are so many records I have added a list box containing the years, each with the appropriate starting record ID, contained in a table as follows:

Name: FirstPhotoOfYear
Field Name, Data Type
Year, Text
1st photo ID, Number

5 records e.g.
2018, 38

So when I select 2018 in the list box, I want to make the form show the record with ID = 38. I thought it might help to add a text box (called Text13) on the form that shows the ID number produced by the list box (called List11). This shows the ID fine, using a suitable expression as its control source.
In code which operates when the list box is updated, I first use Text13.Requery, followed by DoCmd.FindRecord but without success. I don't know how to make it search just the ID field, or even if it's found anything, as the form does not change to a new record.

I await suggestions.
.




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115853): https://groups.io/g/MSAccessProfessionals/message/115853
Mute This Topic: https://groups.io/mt/80837015/3568969
Group Owner: MSAccessProfessionals+owner@groups.io
Unsubscribe: https://groups.io/g/MSAccessProfessionals/leave/6606618/577250336/xyzzy [sugeng.panjalu.access@blogger.com]
-=-=-=-=-=-=-=-=-=-=-=-

Senin, 01 Februari 2021

Re: [MSAccessProfessionals] 2013 Hide Database window

No problem, Patty. Let us know if you run into any problems with my example.

 

Regards,

Bill Mosca

 

From: MSAccessProfessionals@groups.io [mailto:MSAccessProfessionals@groups.io] On Behalf Of Patricia Mapes
Sent: Thursday, January 28, 2021 3:03 PM
To: MSAccessProfessionals@groups.io
Subject: Re: [MSAccessProfessionals] 2013 Hide Database window

 

Hi Bill,

I apologize but I was pulled away and I'm just getting back to this project.

 

Thank you,

 

Patty

 

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> On Behalf Of Patricia Mapes via groups.io
Sent: Thursday, January 21, 2021 7:39 PM
To: MSAccessProfessionals@groups.io
Subject: Re: [MSAccessProfessionals] 2013 Hide Database window

 

Thanks Bill,

I'll give this a try!

Regards, 

Patty

 

On Jan 21, 2021, at 7:31 PM, Bill Mosca <wrmosca@myself.com> wrote:

On Thu, Jan 21, 2021 at 07:57 AM, Patricia Mapes wrote:

Hi,
Does anyone have a good solution for hiding the database windows for access apps.
I would prefer a startup solution but in desperate times I could go firm to form.
Thank you,
Patty

Hi Patty

Here's another way. Call this public function using True argument to show and False argument to hide.

Public Function ShowHideNavPane(bolShow As Boolean)

'Purpose  : Show or hide Nav Pane.

'DateTime : 11/23/2020 11:34

'Author   : Bill Mosca

'Params   : bolShow True=show; False=hide

 

    'Need to select any table in Nav Pane before you can hide it.

    If bolShow = False Then

        DoCmd.SelectObject acTable, , True

        DoCmd.RunCommand acCmdWindowHide

    Else

        DoCmd.SelectObject acTable, , True

    End If

 

End Function


 
--

Regards,

Bill Mosca, Founder - MS_Access_Professionals

Microsoft Office Access MVP 2010-2016

My nothing-to-do-with-Access blog