Forms :: Control Button Linked To Specific Record In A Continuous Form
Apr 3, 2014
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.
I have a main form with a continuous sub-form. On the main form I have a series of text boxes that I want to use as a makeshift status bar. The text boxes would be filled in if a value was entered into certain records on my sub-form.The problem I have is since the sub-form is continuous, how would I refer to the specific record on the sub-form that I want to check for a value?
I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?
I have continuous form in Access 2010. I highlight selected record. Now I would like when user will select record, that record will display button to give ability user delete it. For not selected records button not visible and disable. How to display button only in selected record in continuous form?
I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.
At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.
continuous form: "04 - GASTOS_BUSQUEDA" id field on continuous form: "Gastid"
pop-up (details) form: "GASTOS_EDITAR" id on pop-up (details) form: "editar_id"
This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):
4) Private Sub btn_editgs_Click() On Error GoTo btn_editgs_Click_Err Dim strWhere As String strWhere = "[editar_id] = " & Me.Gastid DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere btn_editgs_Click_Exit: Exit Sub btn_editgs_Click_Err: MsgBox Error$ Resume btn_editgs_Click_Exit End Sub
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 have a continuous subform that shows 2 records consisting of a text field and a yes/no field. I was wondering if it was possible to take the state of one particular of the yes/no fields to trigger an event. Specifically, when one of the questions is checked [true] then I would like to make visible another subform on the main form.
Can this be done, and if so, how, or should I just leave my subform visible at all times?
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?
I have a continuous subform recording the information of various wireless products for an employee embedded in an employee main form. Please see screen shot enclosed.
There is a check box "BYOD/Personal" on the subform. I want to hide a number fields when this check box on independent record is checked. However, if I use the following codes, the changes apply to all records under that employee.
Private Sub BYOD/Personal_AfterUpdate()
If BYOD/Personal.Value = True then Me.Provider.Enabled = False Me.XXX.Enabled = False....etc. Else Me.Provider.Enabled = True Me.XXX.Enabled = True....etc. End If End Sub
How can I just disable those fields on the subform of a specific record when the BYOD/Personal field for that record is checked?
I've got a continuous form that displays my massive 3,000+ inventory, with the option to filter down to specific categories. Some categories have 5 items, others have hundreds. The design I have used makes it look really tacky once I filter down to one of the categories that has 5 items, because there is no scroll bar.
What I've tried using is:
Code: If Me.RecordsetClone.RecordCount < 10 Then Me.Scrollbars = 2 'vertical only Else Me.Scrollbars = 2 End If
But it still doesn't display correctly (nobar.png). This is probably my biggest headache right now, and every "solution" I've found, doesn't work.
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.)
I need to open a specific pdf file per record by using a command button. The pdf files will all reside in a specific folder in a partition on my hard drive. Each pdf file will have a unique four digit file name e.g 1234.pdf.The file name will match a unique number allocated to each record. This number is generated by adding 1000 to the record ID.Record 10 will therefore have an associated pdf file name of 1010.pdf.I have created a text box field , named 'TestReportID', to capture the unique four digit number per record that I assume is needed to be referred to when setting up the code to find and display the correct related pdf file.
I have set up a command button on the records form and as simple test using the hyperlink address to the folder where the pdf files reside, I can open a pdf file by clicking on the command button but it does not matter what record is open when I click the command button, it will always open the same pdf file.If I don't identify a specific file name in the hyperlink address, when I click on the button it will display a file open dialog which lists all the relevant pdf files and I can then select and open the required file.I would like to cut out that step and get the correct file to open when I click the button.
I am trying to make a simple form to tally my total products ordered.
So I wanna add a plus and minus button on my continguous form, but i cant get it to work. How do i update the current record when clicking on the button next to the field ..? It seems only the first record gets updated ..
I am creating a program to allows us to figure out where our personnel are. I am using a continuous Form that shows the individuals name, phone numbers etc. and infront of that is a checkbox, and a combobox that shows "Leave", "TDY", "Contacted" etc. I also have two fields that fill up with what time they were contacted or when they reported in. The default status is "Not Attempted and the checkbox is not checked, and the time fields are blank.
I attempted to use this code:
Dim ctl As Control For Each ctl In Me.Controls Select Case ctl.ControlType Case acCheckBox ctl.Value = False Case acComboBox ctl.Value = "Not Attempted" End Select Next ctl
but it will only clear the one line (it doesn't clear the times yet, i figure i'd add that once I figure out to clear one). This seems to work if this was a single form, but not for continuous. How can I convert this for continuous forms?
I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?
I have a continuous form with a button 'Cmd1' & a textbox 'txtMail' which is set to visible no.
When the user clicks Cmd1 - then txtMail becomes visible.
I can do it using vba on the buttons click event but when it executes txtMail for all the records become visible.
How do I use a button's click event on the form's current record - Private Sub Form_Current() so that when the user clicks Cmd1 on the current record only txtMail for that record becomes visible.
I have two command buttons in a subform "sbfScoutRegDetails", one that launches a report and the other attaches the report pdf to an email, associated with the record ID when clicked.
Both of these buttons work fine when just the subform itself is open, but when viewing it in its main form, I get a window saying 'enter parameter value' for "Forms!sbfScoutRegDetails!ID" (this is the WHERE condition in the macro).The report then opens with all the record information blank.The full WHERE condition
Code:
[ID]=[Forms]![sbfScoutRegDetails]![ID]
Not sure if it's because of using a continuous form as a subform? I need the user to be able to view/print or email a contract to each group/contact that signs up.
So I have a continuous form and I have a button that is pressed when a job is released and it record a date in a field. I wanted to turn that button to disabled after pressed but after lots of reading found that it couldn't be done in a continuous form due to it disabling all buttons . So I decided to just make the code populate the field only if it was a null value so that it wouldn't overwrite a value if someone pressed it more than once. Well the null is my downfall in all this. I cannot make it compare and populate the date when the button is pressed. I have tried all I can find on the net and all I can think of.
I have a linked table in ms access and it has a column as details. in ms access when i click on this button i will go to another form. i want to assign a picture (for opening a form) to this column but i don't know how i have to do this. my form opens as a datasheet view.
In the form is the table tbAssembleias, but I want to put from the other table which is not present in the form:
1. a control that count how many are present (= yes)Ex: Appearances 22. a control that sum the votes of those presentEx: Votes 9I already have a query that count how many are in the meeting, but cant realize how to pass the information to the field in the form..This is the SQL view of the query with the real field names - and working: SELECT Count(tbEntidades.tbAssPresente) AS ContaPresentes, tbEntidades.tbAssPresente FROM tbEntidades GROUP BY tbEntidades.tbAssPresente HAVING (((Count(tbEntidades.tbAssPresente))=True) AND ((tbEntidades.tbAssPresente)=True));
I have a form based on a query in datasheet view. What i would like is to show only those records that fulfill the truepart of iif statment, and do not show the ones that fulfill the false part.
I have the following fileds in the query
month currency 1 checkbox currency 2 checkbox sum
In the form, the control named month contains the following code:
control source: =IIf([checkbox1]=no;[month];0)
So this gives the appropriate months, but also shows the all other records with a 0 in the month field. I would like to get only the records shown that are correct with the truepart of the statement.
So I'm not new to Access but I am to 2010. It has been a bit "challenging". Here's my first question:
1.) I'm trying to search on a field by using a command button. I basically want to click the button and the following message pops up: Enter MRN.
2.) When the MRN is entered, I would like the form to filter on all records that have this MRN.
3.) In old versions of Access, I would create a Macro for this and then call the Macro in the form.
4.) I've tried the FindRecord action in the Macro but it does not work. I actually came across several actions that don't seem to be working properly (getting error messages).
5.) In my head, this should be one of the EASIEST things to do. I've done this before in several different databases. I will admit it has been a few years since I have used Access for this (ie. building forms, macros etc.). I've primarly used it to pull in a data set and then run some queries to get the data I need quickly versus using Excel.
I wish having only one record display in a continuous form, after an "On Click" event. The database in which this question lies is attached.
On opening, the user first interacts with Table 1 (Continuous Form), then by clicking on ID on the details for that particular record appear.
What I would like to do is: When the user clicks on ID, only that record whose ID has been clicked on displays first on the continuous form, and then the PERSONAL form opens. To clarify further, my wish is that the sequence of events is:
User Opens Table 1 Form
User Clicks on ID (for example, let's take 2)
Only Record with ID 2 remains on the Continuous form.
Then details for record 2 display on the Personal Form that opens next.
The problem I currently have is with step number 3 above.
I have a continuous form with unbound controls. These controls write new records into a table using rec.addnew
If possible, I would like for the user to only be able to add/edit the new record only and not to edit the continuous form below. When I turn off edits on the form, I only get the new record to show. I found some pages that reference using code like .allowAdditons, .allowEdits and .allowDeletions but unsure of how to implement them since I have more than one control the user is entering data into. I also found another site that says to use a control to determine if the record is writable to: I do have a control that is set to =Date() on the default value.