MS-Access Open record as it is created - ms-access

I have made a booking system that allows the user to book a ferry trip. Once the user has created their booking another window pops up with a confirmation that displays the info they put in and also the calculated price depending on what they put int. All of this is fine but I had an issue with it not going to the correct record after creation. I entered:="[Booking Number]=" & [Booking Number]into the WHERE CLAUSE on the MACRO for the button before this window appears hoping this would work.
However, the issue I now face is the Confirmation Window is Empty. I think this is because it is trying to capture a record that has not been created yet but as I am not experienced with Access (literally started yesterday) I do not know how to go around this.

I solved this by removing the WHERE CLAUSE on the macro.
On the confirmation form, On_Open I added a refresh before going to the record. This solved the problem.

Related

Form not showing data

The database that i have made is largely successful within my workplace. However there is this wierd thing going on with one of my forms that wasnt doing it last week when it was last used. I havent done any updates to the form or VBA.
I have the form linked to the right table and I can enter data in. However after leaving the field it goes blank. Once I click back in the field I can see the data again. But when I leave it it hides itself again.
The picture attached is the form that I should be able to see the data.
My form is not is Data Entry mode.
Any guidance on this would be greatly appreciated. I have a whole shift dedicated to making updates and fixes on friday.
Thank you so very much!
Brake Form

How do I create a "Details" button in Microsoft 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.

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.

Avoid problems in key-controlled HTML forms if key is permanently pressed

I created a simple web application with two pages. For a better usability I make it key-controlled, which leads to a problem. This is the workflow:
A form in which pressing ENTER key (or a button) executes the submit. This starts a database query.
The second page then displays the query result; a "Back to start" button calls the form again. The form is refilled with the same values again. The button can also be activated by ENTER.
The problem occurs when a user permanently press the ENTER key. Then dozens of querys are executed and this nearly kills the application.
Any ideas how to handle this without losing comfort? Thx
If you are using any server-side language like PHP or similar, you should add a flag to the user session which indicates whether the form has been submitted previously. You can also count the number of submits if you want the form to be submitted multiple times but not infinite.
If that doesn't fit your needs, please describe your execution environment more precisely.

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.