I've got two control buttons ('OK' and 'Cancel') on several forms. They work on the forms in Single Form view, but not on the one form that is in Continuous Form view. I couldn't find any mention of this behavior on this forum, but on another forum somebody mentioned that Continuous Form view makes control buttons do odd things. Any ideas on how to handle this?
Here's the code:
Private Sub OK_Click()
On Error GoTo Err_OK_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Visible = False
Exit_OK_Click:
Exit Sub
Err_OK_Click:
MsgBox Err.Description
Resume Exit_OK_Click
End Sub
Private Sub Cancel_Click()
DoCmd.Close acForm, "Glossary"
End Sub
I want to use buttons on a form to change the sort order on a continuous form. In the buttons click event I am using a public function (named Sort_1) to change the sort order. The first element of the event call is the name of a generic query (named Sort_1_Query1) and the query field to sort (LAST_NAME OR FRIST_NAME, depending on the button.)This is the Click Statement.
=Sort_1("Sort_1_Query1","LAST_NAME")
This is the Public Function Public Function Sort_1(SortName As String, FieldName1 As String) DoCmd.ApplyFilter SortName, FieldName1 & "between 'A' and 'Z'" End Function
I think the problem is in the use of quotation marks or trying to pass the query field name to the Do Command or the use of an ampersand.
I would like to be able to use several control buttons to change the sorting order of the selected records on a form. The only way I have been able to do it so far is with a macro "go to control" and then using the Sorting Icons on the menu. Grateful for any help
Hi I have a problem that has been messing my head up. I want to be able to change the way the tab button works in a continuous form, instead of the tab tabbing across/through a single record first I want to be able to tab down/through the fields. I know this may seem strange to some but that is how I would like it to work. I could change the form to something else but that would require too much alteration and make life harder in the long run.
I currently have some VBA code set to ensure that the field that is select on open has a TabStop and all other fields do not. Is this the correct way of doing it or is there an easier way.
I am having trouble with a continuous form setting Enabled to False in the current record only. I have tried code in the OnCurrent of the form and OnOpen, examples like
If Me.NewRecord then Me!Quantity.Enabled = False .....
also
If Me.NewRecord = True then 'if this makes any difference?
Dataentry is set to Yes and have tried No also with no difference.
So I can set all [Quantity].enabled to false but I only want to set the New Record, not all the records I have already created.
Any help would be appreciated as I still have a pretty basic knowledge of Access
I created an Event Procedure on the After Update event for a control in a continuous form. Basically, if certain conditions are met, I want it to disable another control. It works perfectly, except it is disabling the controls for all the records instead of just that record.
Does anyone know how to get it to just update that record? I've been researching and cannot figure it out!
Basically I have a continuous form with each record having a textbox and a checkbox. There can only be one checkbox ticked per record but what I want to do is to stop the other checkboxes from being ticked if one is already ticked.
I have a continuous form on which where each record has many controls, including control (A). I wish to set the colour of this control based on the contents of another control (B). Control B is a memo format and is placed behind another control making it hidden. The idea being that the user can then click on control(A) and look at supporting information from Control B on another form.
Conditional formatting cannot be used since this only allows conditions based on the control (A), not (B). Event procedures cannot be used since they all depend on making a record the current record, and I want the user to immediately see when further information is available. When I apply VBA code using an 'on load' event it is action for all records on the form in a way that if only one record has extra information, all records are flagged in this way.
I am mid way through a Access db and have a solid idea what i want from a form. The idea is for a rota display and edit form.
a tab control with 5 tabs (-2 weeks, -1 week, current week, + 1 week, + 2 weeks) and when the user clicks it lists all the employees (Employee Table) with any found rota entrys (Rota Table) populating into a text box type table with employees information blank where no rota information has been entered.
then the user can edit / add shift information from that table and hit save.
the main rota information is inputted by an excel import but this is done once a month and adhoc changes will be needed (holidays absence etc)
the only thing i found like what i want is a continuous form (which ive never used before but been told that wont go in a tab control)
How i would accomplish this (code snippets - doesnt have to be detailed just the fundamental functions so i can add modify to suit the information the sql's i already have its just the form controls.)
Access 2010. I have a form pulling from a query to create a "To Do' list of sorts. On this form is a button to open an input form for the corresponding record (I hope). When this button is used I want it to pull certain data for that specific line from the query and input it into the new record opened by the button. I know this is possible as I use another db that does this but I have not been able to figure out how to make it work in the new db.
1) I have a Main form with a tabbed form that has two subforms attached to it. How do I move the focus from the last field on the first subform to the first field on the 2nd subform without using the tabs at the top of control.
2) Subform #2 is a dependent form of subform #1. Since I can have many products associated with the customer form, I have added an add new record command button using the wizards. The button does not take me to the first field on the 2nd subform it just sort of blinks.
I want to put three buttons on a form to filter records (Filter by form), a clear form button and one that applies the filter (Apply Filter) similar to those on the toolbar. The wizard for control buttons in the toolbox isn't helpinjg much. Any ideas?
I have an input form for production. I need to be able to have a unbound box look at the start time and end time. I need it to determine if the times fall during a break or lunch. My fields in my table are - ID, Start Time, End Time. Example of what I need the control source formula to do is this. If I start at 6:00 AM and work till 10:00.AM and my break is Start Time 9:00 AM... End Time 9:10 AM. I need it to then show 10 in the box as result of the break. I have this so far as in my formula builder.
IIF([Start Time]<9:00 AM AND [End Time]<9:10 AM, 10, 0)
When I press enter it says I have an syntax error and I have checked to make sure the fields are correct. Also how would I go about adding on to this formula to add a lunch break on to it.
I am not even sure where to start with this small problem that will make a big difference.
I have a database that produces yearend accounts, its highly specialized to my industry.
The year end accounts have schedules these can be 1 to 3
On my form I have it set up for 3 schedules, but can be used for 1 and 2 schedules accounts.
However when it come to the reports for layout reasons 3 of the 14 reports needed are tailored to a 1, 2 or 3 schedule, and i have created reports and buttons on the form according to the number of schedules for that account.
What I want to know is this, I have a field on my form that states the number of schedule for that account, is it possible that if say the account i am working on is a 2 schedule account, that it disables the 1 and 3 buttons?
I have 2 Option buttons that I want to use to control a combo box. If I select Option1 then I want it to pull from one table for the drop-down choices. If I select Option2 I want it to pull from a different table. The Option buttons and combo box are all on the same form.
I'm very good with utilizing the access tools however I can only code in vb editor minimally. What I'm looking to do is have the option buttons control two combo boxes. One to search by user name and the other to search by serial #. I've created an option group with two buttons I set the default values in the combo boxes in accordance with the option buttons However, the option buttons aren't doing what they are supposed to do. I've been told I need to tweak the code for the buttons in order to make them control the combo boxes. Does anybody know what I need to do to make this happen? Ultimately the user will be able to click either of the buttons to perform a search through a single combo box.
Thanks to everyone out there for making this possible. Your expert knowledge will help me grow into an expert myself.
SELECT Count(T_STUDENTS.studentsID) AS res1yes, T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup FROM T_STUDENTS, T_COACHING WHERE (((T_STUDENTS.res_vrijstelling)=False) And ((T_STUDENTS.stud_year)="1") And ((T_STUDENTS.stud_coach)=forms!F_cboCOACHING!cboCOACHING)) GROUP BY T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup;
It runs fine, untill the moment the count is 0. At that point it breaks the form. How can i tell access to deal with this? Somehow i need to replace the count result with 0 if there are no records that meet the criteria.
I have a form that displays its records in a Contiuous Form. The controls on the form are: txtRecID, txtStudID, cboTrimester, cboType, fld Comment, and blnReqConf.
My issue is that I need the blnReqConf (Request Conference) checkbox and label controls to only show on the reocrds when/if the cboTrimester = "Tri-2" and the cboType = "Parent" or "Teacher" are selected or displayed.
I have written: If cboTrimester = "Tri-2" And (cboType.Column(1) = "Teacher" Or cboType.Column(1) = "Parent") Then blnReqConf.Visible = True lblReqConf.Visible = True Else blnReqConf.Visible = False lblReqConf.Visible = False End If
The problem is that the controls display on all records throughout the form. How do I make it so that the controls are hidden on some records in the continous form and are shown on others based on the criteria? Is it possible?
Please see the attached images (screen shots from my db).
I'll start by explaining the function of this form. Invoices are raised through a different area of the system - they then appear in the outstanding invoice list in my payment processing screen while awaiting payment. When a payment is received the user creates a payment using the controls at the top of the form. When created - payments will appear in a list box at the bottom of the screen. I then want the user to be able to highlight a payment from the list and type the amount to allocate against each line in the outstanding invoices subform. Then (once happy with the allocation) press the "Allocate" button which will cycle through the allocations the user has made inserting rows into my Transaction table - allocating the payment against multiple invoices.
The fields displayed in the outstanding invoices subform are selected in a query which calculates the amount still outstanding. In trying to illustrate my aim I've added an unbound text box to the subform (the column Allocate). What I'd like to be able to do is type a different amount against each outstanding invoice. I understand this is not the way that unbound controls work in continuous forms - i.e. that they are multiple instances of the same control hence when I type 100 against the first item in the list it appears against every item in the list. I can't use a bound control because the query is not updateable - and in any case, the entry won’t exist in the transaction table until it has been inserted anyway.
I'm pretty competent with Access and VBA but haven't really explored recordsets - I'm usually able to achieve what I want by binding my forms to stored queries. This, however, is a bit more of a complex problem than I'm used to dealing with.
So, to the point then. I guess my first question is - is it possible to achieve this? I'm sure it must be. If so please can someone try to shed some light?
Secondly, I have an idea but have absolutely no idea of how to implement it. I seems to me what I would need to do is build a temporary recordset for the form and add a field to it i.e. the "Allocate" field I've been talking about. The user would then be able to manipulate this recordset because the form wouldn't be directly accessing a query. Nor would there be any unbound controls on the form. Once the user had typed in all of the allocation figures they are happy with they would be stored in my temp recordset. They could then hit the "Allocate" button which would cycle through the recordset inserting rows into my Transaction table (as long as various validation rules were passed).
Does this sound possible? If so can anyone give me any help or point me in the direction of any material they know of that might be of any help?
Thanks in advance for your help.
To give a flavour of how I originally built this form I've attached another image - PaymentProcessingOld.gif. It's a similar kind of setup. Payments are created at the top of the screen and appear in the list box bottom left. The outstanding invoice subform serves only as a point of reference. The user actually allocates payments by selecting the item from a combo box and typing the amount. This builds the transaction I've talked about above. It's quite straight forward when there are only a few payments and allocations, but in practice payments are usually large and split across up to 100 different invoice lines. That makes it a very tedious task.
I'm building a workCube reservation system and I've been tasked to have it work kind of like an airplane seat reservation system. I've laid out my form with option buttons representing the location of each available space. (space1, space2, space3...space16)
My desired outcome is to be able to select a date from a calendar popup and have the options buttons react to that date if they have been reserved. (change color and indicate "reserved").I've tried to create the form based on a query which represents the "booked" table.
Tables:
Employee (k)empID emplyeeName
Space (k)spaceID space
Booked (k)spaceID (k)empID (k)bookdate
Some rules a space can be booked by any ONE employee on any day.How can I get any and all of the option buttons to react if there is a reservation in place on the day indicated by the calendar?
I am building a database where one Form displays records from 14 different tables. For some reason, when I recently try to add a field on to a form from a new table, the ENTIRE form loses the record source, and every single field that is already on the form gets that green dot in the corner with errors surrounding a record source that cannot be found. What am I doing wrong? Am I exceeding some limitations with forms?