How do I create a "Details" button in Microsoft Access? - ms-access

I'm new to using Microsoft Access, and I'm having trouble restricting a report's output to only the single row I'm interested in.
My organization has a relatively small client list, where a little of their information is used frequently (like their name and account status), and much is used infrequently but still important (like home phone and incident reports).
The way I want to display this information is to have a form that shows a list of our active clients with their most common information, and then has a "Details" button at the end of the client info for when people need to see the rest of that client's information.
So far, I've successfully made a form that links to an "ActiveClients_rpt" report that shows the most common info, and I've made another form that links to a "ClientDetails_rpt" report that shows all the detailed info. My problem is that when I try to restrict the results in the Client Details report by the user input in the Active Clients form, either I have to use a very unaesthetic option (like an ugly combo box that replicates the list of names the user can already see), or (if I try to do something like add a button inside a report) the form sends me the information of every client's detailed info, when I only want the info of the one client.
Is there some way I can use a report (or some other option) to tell Access to only pull information from the row in a list the button is located on? I've tried doing things like making an embedded macro using the OpenForm command to open my ClientDetails_form form with [Forms]![ClientDetails_form]![ID] or [Forms]![ClientDetails_form]![ID]=[Me].[ID] as a Where Condition (where ID is the client's ID #), but everything I've tried has either resulted in an error or not restricted the report like I want it to.

This is pretty complicated without seeing your actual database, but I did a video on something similar that might help here https://youtu.be/nNUjmH72OfI. You basically set a click event in the 'Event' tab of the Properties window while your 'Detail' button is selected (in form design view). You click on the builder button (button with three dots) and either use the Macro Builder or the Code Builder to type out the VBA. The Macro Builder is the simplest way in this case.
That's pretty vague, I admit. But hopefully the video helps.

Related

generate link with that opens pre-populated message on clicking

We have service where all user interaction is done via texting (iMessage) using Sendblue. We want users to be able to refer their friends to get free credits. The easiest way we can think of would be giving that user a link to send to their friends, which, when opened, would auto-populate a message to our number, the content of that message being the referring user's number. Example:
I (phone number +1234) want to refer my friends. I send them a link, which when they click, opens a text message to +4321 (the service) with the text prepopulated with my phone number, "+1234".
Right now the entire service is run through Zapier, so ideally would be able to work through that. You can also enter Javascript blocks into Zapier to manipulate data if that would help.
The only solution I have been able to come up with so far is create a different webpage for every person's phone number, which would just be a custom html link with the above that would be clicked automatically on page open.
Is there an existing service that does this (and ideally works with Zapier)? Or would I have to do what is described above? If so, what is the easiest way to integrate that data? Is there a way to automate webpage creation?
Any and all help is appreciated!

MS Access - Prevent prompt to save form

Sometimes when I've made changes to the form via VBA (change in record source, control source, making controls visible or not, etc.) the user will be prompted to save the form when closing it.
Is there any way to avoid this or prevent the prompt?
Im posting in the answer section because I'm unable to post under comments, I'm Relatively new to this site.
Anyways, are you making the changes while other users may be using the form at the same time? That's the only thing that would make sense to me is that a user is in the form when you are making your changes which it then asks them to save the changes to the form, as it would be different from the time they first entered into the form.

SSRS 2008: Clear report contents when new parameter value is chosen

I have an internal SSRS report that can be run against data for different clients. The report has just one parameter "Client" which is a drop-down menu populated by a DataSet which populates from essentially "select distinct Client from ClientStuff" which returns a short list of clients.
The user chooses a Client from the drop-down and hits View Report, report populates with data. Fine. But then, when user chooses a different client, the report contents remain up and showing until "View Report" button is hit.
So here is the question: How do we force report contents to clear out when a new value is chosen for the parameter? Too often, user selects a new client but forgets to hit View Report, thus looking at one client name but seeing data as another. I want a blank screen showing as soon as the user picks a new value for the parameter.
I've searched and searched on this problem, I've set parameter properties to "Always Refresh", I've deleted and re-deployed reports... nothing seems to make it happen.
The parameter properties options to "Always refresh", etc. have to do with cached data, not whether the report will refresh once a new value is selected (which I assumed was the case, too). Unfortunately, according to a few sources I've found (Such as this) indicate that refreshing the full report when changing a parameter value is not possible without user input (i.e. pressing the Apply button/the Enter key).
What I generally do is find somewhere on the report to display the parameter value that's currently chosen, so end-users will see what the report is displaying. Not nearly as good a solution, but that's what I've been stuck with.

View Custom Field Passed with GetResponse Form

I'm passing document.referrer to GetResponse when a user submits the subscription form. The custom field has been added to the form at runtime as instructed in this document and the "Forward Data" option is on. Upon form submission, the parameters are posted correctly. Problem is, the value doesn't show up anywhere in the user's details in GetResponse, where it would be most useful. Where can I retrieve it?
I'm answering my own question s I've found the solution by trial and error. Not even the support people at GetResponse were able to help.
Apparently, only the custom fields that are actually added to the form designer get recorded. So if you use a custom form (not created with designer), on top of adding the <input> fields in your code, you'll have to create them first (dashboard > contacts > custom fields) and add they'll appear in the designer as well (on the right side).
After that, the passed values will show up in the contact's detail card. To retrieve the values for more than one contact in bulk, you'll have to export the contacts to csv, xml or xls, as support says there is no way to display additional columns on the contacts page. The alternative, if you are looking for a specific value, is to filter by the custom field on the contacts page (left side, 'add custom field').

Access 2007 can I capture the "clicked" field using an OnClick event on a report?

In Access 2007 I want to be able to click on a name field in a report and call a separate report with personal information about the person who's name was clicked to start the event. This would be as an alternative to creating a subreport or including the subreport fields in the main report in the interest of saving space. How do I reference the value of the clicked field for use in a query called with the OnClick event?
Thanks for your help.
You are kind of blurring the lines between a report and a form there. Could you not change your first report to a form (maybe a continuous one?) and then fire the sub report from that?
If you do want to still go with the report then it might be possible. At a guess it would involve returning the X/Y of where the mouse is and then mapping that to each control to work out which one has been clicked. Have a poke around Steve’s site as I’m sure I have seen him use something like that for a different purpose
http://www.lebans.com/
Use a form and have code behind the field to open a subform with data limited to that field. You may not get all the functionality of a report.
You could prompt the user when the report opens to give them an option to see details. They could select a specific record with an input box to show the details. This would require the user to rerun the report after looking at it in summary mode.
If you could output the report to an html file, you could create hyper-links to additional information.