Forms :: Give Warning When Switchboard Form Opens?
Oct 2, 2014
I have a table which holds information relating to a fleet of vehicles; each of these vehicles is currently physically checked on a daily basis for a number of items, one of which being to check that the vehicle has valid VED (tax disc).
With the paper disc being abolished now, we have a situation where the individual using the vehicle cannot be certain about its VED status (the chances of one not being taxed is next to nil, but we are talking a fleet of nearly 1000 vehicles here, so anything is possible)
Our current database has most of the vehicle information stored already, so in theory I think I only need to add a couple of fields, which will make the table structure (roughly):
Is it possible that when a Form (not related to the table, and most likely the main switchboard form) is opened that both the MOTExpiry and VEDExpiry dates are checked, and if either or both of them are due to expire within 7 days or have already expired that a warning appears (vbaOKOnly messagebox would do fine) stating that there are vehicles that require their MOT & VED dates to be checked and updated accordingly)?
I decided to create a switchboard using tools---> DB utilts---> SW manager. i have managed to get this on the front end, altho the first button the contacts does't work properly. when i click it using that i cannot see any of the data that is in the database? but if i go out the switchboard without pressing anything on it. and goto contacts form the data is there?
I open a form (EntryBasic) for users to enter data in, which is then saved to the only table in the database (MasterTable). The form (EntryBasic) has a list box with four choices: red, white, blue, orange. The button that opens the form is placed on another form (MainForm) The form (EntryBasic) record source is MasterTable.
A user is on the MainForm and needs to add a new record related to red. When user clicks on the button (NewRedEntry), I need the form to open and the list box pre-selected to red.
Is there a macro or VBA code that might simply execute this action, preferably something that can be attached to the NewRedEntry button?Even better, if there are two list boxes, code such code be applied to same NewRedEntry button, where both list box values are pre-selcted with the click of this button?
I am having a hard time with this project that I'm working on at the moment.
I have created a modal dialogue form that has a macro set to open another form and close the current form at the same time. The form that is being opened has textbox controls that have the default value set to hold the data that is in the textbox controls in the modal dialogue form that is closing. The problem is, is that when the modal closes, the controls in the next form display #Name? and the data is not copied to the next form.
I have a form that opens from a different form based on the primary key within the original form. Unfortunately it seems to be opening a new record every time I open the form--not only from the original form but also straight from the sidebar.
The command button that opens the second form from the first uses the following VBA:
This exact coding worded perfectly in a similar set of forms that I had created; the only difference is a change in the form name & primary key field.
Add onto this, I think that the code DOES work, but then it immediately opens another new record. When I open the second form from the command button, then change to Design View, the form's Filter property is set to [Event_ID]=X (where X is the proper key from the first form) and Filter On Load is set to Yes. The X in the Filter changes accordingly when it changes in the first form. Also, every time I open the form a new record is added to the underlying table.
I've tried setting "Allow Additions" in the second form to No, but then when I open the form nothing appears. Literally; the entire form is blank, no labels, textboxes, combos, buttons or anything. When going to Design View it's still all there.
I've also checked the On_Load, On_Current & Form_Current events and found nothing. I even deleted them and the problem still occurred.
I just copied a form from one database to another and for some reason the copied form in the new database does not display. the form opens but the area with all the info is blank... When I choosed design mode it all shows up correctly but in form mode it is just blank.
I have a "Search" form that I am using to search through a query in a list box of all of my Customers. Once the record that I am wanting to view comes up I highlight it and click a "View" button to bring up another form with the customers full record. When this form is open I am able to update the customer information and add User's to it if necessary.
My problem comes after I click on my save and close button that takes me back to me search form. I want to close the search form and the error I get is "The record cannot be deleted or changed because table "tblUserProfile" includes related records." I click OK and get a SECOND error stating "You can't save this record at this time. MS Access may have encountered an error while trying to save a record. If you close this object now, the data changes you made will be lost. Do you want to close the database object anyway?"
I have already made my changes and saved them in the form with the customer record so am not sure why I am getting an error when trying to close the Search form.
I'm using a navigation control to switch between forms. In one of those forms, I have a continuous subform which is a list of Projects (source is a query) that is read-only. To edit a project, I can click on its name, which switches the form displayed in the navigation control via docmd.BrowseTo (with acEditForm as the last parameter). This works fine. The proper form opens, with the proper project being displayed.
Now, on this second form, I have on the right the list of tasks contained in the project in a continuous subform (source is a query), and on the left another subform which is kind of an "edit bar" that I use to actually edit the individual tasks. So, when I click on a task in the task list, the OnCurrent event triggers a docmd.BrowseTo command that updates the "edit bar" subform and passes the ID of the task as the WhereCondition parameter. This updates the values displayed in the Edit Bar to that of the selected task, which I can then edit.
Now here's the thing: depending on the project I open, the Edit Bar doesn't work. Actually, it looks like only one of the projects is working, while the others are not (and I managed to have a different project working, but only one works at any given try). When it doesn't work, the Edit Bar is in "NewRecord = True" for some reason. All the other properties of that subform seem to be the same between when it works and when it doesn't.
So, it looks like the same command (docmd.BrowseTo with acEditForm) opens the subform properly in acEditMode when it works, and in something else when it doesn't, depending on the parent record that's being opened. This really gets me, I really can't figure out how that's even possible.
I suspect it might have something to do with locked records, maybe?
I've recently decided to move a database that had all its information on 1 table and divided it into multiple tables.
Attached is the relationship as well as the form.
The issue I have is that when I click the form, it only shows a blank record with none of previous records.
Data entry is already set to NO. I'm wondering if it's an issue with my relationships, tblStudioDescription is the parent table and the others are child tables so I linked them with the ID and set referential integrity.
I've been given an existing database to modify, and I'm struggling somewhat to see how the author has implemented certain functions.
On a main menu form (autoexecs on starting the database), there are various "Search By" option buttons to generate a report, ordered in various ways. The "On Click" field for each of them refers to a macro, called Buttons, and a line in that macro dependant on the type of search (e.g. OnClick = Buttons.byPerson).
The Buttons macro runs an OpenReport command, the report corresponding to the search type (e.g. Buttons.byPerson has an OpenReport command for the "Report by Person" report).
However, when I click the search buttons (or indeed run the corresponding reports) I instead get another form which allows the search criteria to be specified - this then generates the report (I would assume based on the relevant query - e.g. Person Query), but I cannot understand how this works.
Google searches have not helped much as I can't seem to find an adequate search phrase to use, and I've been staring at the thing for some hours now. Any help getting me off in the right direction would be much appreciated!
I am using Access 2007. I have had an application running now for about 1 year and now getting an error when user opens the database. (Have one for front end and one db for backend)
Here's the error message:The form name Switchboard is misspelled or refers to a form that doesn't exist.Also, multiple users are accessing the database at the same time.
Have created a form to display/change table info in Datasheet View and added the form to a switchboard.When selected from switchboard, it displays a single record. When executed from the Forms (objects), it displays in Datasheet view.? How can I get it to display in Datasheet View from Switchboard?
I have two tables, categories and items. I have a form that is linked to the categories table and a subform that is linked to the items table. The user selects a category on the main form then an item to add to the category on the subform. (all of this is functioning correctly - but you need to understand for my question.)
Both the form and the subform have a text box that displays a record from their respective table, for the example we will call this color.
What I need to do is create code that checks the color text box from the category (main form) against the text box for the item (subform) and if they are not a match I need to display a message box - from where I can then add the necessary actions.
EDIT: note this is not a query on an entire table or 2 it is just comparing the two text boxes on the form and subform
I have database that i am working on , i want to give a user a time limited accsess ( one week ) to the reports section for example !!
after a certain date he will require a password or the report button will be inactive ...
-at program start up , it will check for today's date if it is greater or equal to (lets say ) 24-9-2013 then it will change a field in an X table from "yes" to "no" ,
-after that the code will check table X for the yes no field , if yes then open Form A if no then open form B / or make report button inactive
how to do that in VB ... and is there is a better way to do it ? can it be done in the macro builder ?
Hi I am trying to get access to close all open forms and open the selected form when a button is pressed.
I tried this in a macro like so:
open switchboard open new.client close (forms)
The switchboard is used as a back drop to the database. the new client form will open over this (pop up is set to YES) Any other forms will be closed at this point.
I can only get it to close one form at a time which means I have lots of close commands in each macro.
The problem is, if I add a new form then I have to go through each macro to reset it to take that form into consideration.
I have changed my approach for my database, and i think a query is what i needed all along. But i am not sure how to go about it.
Is it possible to have query results on a form?
more precise, i have a table full products, alot of information per product (about 30-50 fields)
The amount of actual products isn't many probably around 10, and it's likely to stay at around 10 products.
Can i have a drop down list listing all the products, so it looks these up from the product table, you select the product, that product field value becomes the criterea for the query, and all the associated form fields get filled out to do with the product selected.
To summarise, can i have this all done in a form? so it's easy for staff to simple go the to product drop down list, select a product, all the info relating to the product is then displayed on the form.
I have a data entry form linked to a table that records daily catch details (date, invoice number, buyer, kilos, price, etc). For the last 2 years I've been using the no duplicate index on the date field of the table to prevent duplicates, until he (my husband) decided that he wanted to sell his catch to different buyers on the same date.
I've changed the index to allow duplicates but now I need to create a message box which warns that he is entering a duplicate date as he has a history of trying to enter the same info twice. I've found examples of code that warns on duplicate text entries but nothing for duplicate dates?