Forms :: Cannot Get Event Date To Populate In Case Form
Jun 4, 2014
I am having problems with my subform. I have a table that has events with dates. When I create a subform with eventnames, it shows up. However, I cannot get the eventdate to populate in the case form.
I have a date control and on the Click event I run the following code. Trouble is the Date Control stops working, ie you can't change the date after one click ?
CODE.
Private Sub Calendar7_Click() weekofyeartxt.Value = DatePart("ww", Calendar7.Value) End Sub
I found a useful password protected form using input box and tried it successfully. However there are two issues. The password is not case sensitive and the password entered displays in the box. Is it possible to turn the password to case sensitive and the entered password is displayed as *s.
'Attached to On Click event of cmdOpenEmpForm Dim strPasswd strPasswd = InputBox("Enter Password", "Restricted Form")
'Check to see if there is any entry made to input box, or if 'cancel button is pressed. If no entry made then exit sub.
I have a form that contains a subform. On the main form, there are 3 fields: [IncidentNumber], [OpenDate] and [OpenTime]. The subform, [CtrlLog Detail] , contains the log entry details for each incident number. Every incident number can have many log entries. Two of the fields on the subform are [EntryDate] and [EntryTime]. The fields work correctly and the forms are fine.The issue Im having is when a new incident number is created the [OpenDate], [OpenTime] and [EntryDate], [EntryTime] MUST be equal because of some filter queries for statistics. Right now the user must physically type in the date/times in these 4 fields when they create a new incident number, which means I'm having lots of data entry errors.
Using default value on either [EntryDate] or [EntryTime] on the subform doesnt work because it doesnt create a primary key for the underlying table and the subform will not allow any other entry (due to some other linked values) until that PK is created. The forms are based on tables linked by [Activity_ID] as the primary key. I want to create some VBA code to see that if the Incident number is a new number (meaning the user must type in the new incident number creating the primary key for [Activity_ID]), that access will automatically populate the [EntryDate], [EntryTime] fields to match the [OpenDate], [OpenTime] fields on the main form. The user will manually populate the [OpenDate], [OpenTime].
If the number is an existing number (and the user is simply adding a log entry to the incident number) then I want [EntryDate], on the subform to default to the system date/time ([EntryTime] should remain blank for user entry) while keeping [OpenDate], [OpenTime] unchanged. When the [EntryDate], [EntryTime] fields are populated on creation of a new incident number, I want the PK for the underlying table ([Log_ID]) to be generated.
I'm currently building my first database for a research project. When we enroll a participant, we need to have an enrollment date/time as well as an activation date/time (and they are not allowed to be the same because, rules). I was able to figure out how to auto-populate the current date/time when we've marked a person as enrolled. What I'm wondering is if it is also possible to auto-populate another field with the date/time, ten minutes in the future?
I have created a basic Volunteer Events and Hours Volunteered tracking database.
I created a form Volunteer Hours to allow an end user to use that form to record the volunteer and hours volunteered on a specific Event. There are two tables needed in the form Volunteer Hours to be used for the end users to record the Event, Volunteer, Date and Hours. The form has drill down fields from two tables:
I want to be able to select the Volunteer Event and have the event date automatically populate in the Volunteer Hours form date field when the Event is selected to eliminate the end user from having to enter the date in.
Also; I would like to be able to add more than one volunteer at a time to an event on the form, this would also decrease the data entry time.
I am building an Access database for a client. It is an employee staffing database. With that being said they would like the ability to automatically populate the "T2PPCD" date field based on what is entered into the "Report Date" field. (Same table)
The date is the Monday after 180 days from the report date.
I already know how to get it to auto fill 180 days from the "Report Date" but I'm not sure how to tell it to give me the Monday after 180 days.
I'm creating a form that when the user selects the following categories in the same combo box (Date Received, Date Reviewed, Date kitted, In Work, Complete) it auto populates dates in the respective fields. As I mentioned, it's only one combo box. The dates will be spread out, so the user will change the combo box selection based on when these events occur. I already have a field for each category both on the table and form. Also, I do have multiple tables for other parts of data, but these categories all fall into the same table.
I have a table called Neutron2015. I want the current date and time to complete when entries are made in two other fields. So I am looking for this date and time to populate in EXLStart when an entry is made in Processed By, and also the current date and time to appear in EXLEnd when an entry is made in Completed By with the bold word being the field names.
Trying to filter a form based on a field with wildcard. My form has a txtCustFilter control where a customer's name can be entered in part or whole. The Customer's name is in PCCustomerName
This code works but, I'd like to make it case insensitive
Dim strFilter As String strFilter = "[PCCUSTOMERNAME] LIKE ""*" & Me.txtCustFilter & "*""" Me.Filter = strFilter Me.FilterOn = True
I have a form with a text box where the user enters a date and then clicks a button titled "Add." I've added an on-click event to the Add button that runs an append query that adds several records to a table [tblTracking]. I have a field in tblTracking called EndDate. I want the date that's entered into the text box by the user to be populated into all the new records added to the tblTracking when the append query is run. Currently, all fields in tblTracking are populated when the append query is run, except the EndDate field.
Is this possible? If so, how?
I've experimented with adding a separate on-click event that adds a record to a separate table containing only the date entered in the textbox and an auto-populated ID field. I thought there might be a way to utilize the ID field to pull the associated EndDate into the Tracking table, but I can't figure that out, either, since I don't know how to tell it to look at the date field in the last record of the table. That sounds unsafe anyway.
I am populating a table using combo boxes in a continuous form. The box box alone works fine without any issue of repeated data. But as you know obviously the combo box only populates data in a single column of the table, in which case mine is the LASTNAME; so now I am attempting to populate a unbound textbox with the FIRSTNAME side-by-side with the combo box for the same record.
In the After Update event of the cboLASTNAME:
Code: Me.txtFIRSTNAME = Me.cboLASTNAME.Column(3)
However, after updating the the combo the textbox data is repeated.
I am trying to write a code that will execute at the change even of the combobox/Listbox and when a character is typed in it then all the data from "DocumentType" field whose first character matches with the first character typed in Combo/Listbox will be stored in it.
The following code doesn't work:
Private Sub ComboBox4_Change() Dim strText, strFind As String strText = Me.ComboBox4.Text If Len(Trim(strText)) > 0 Then strFind = "BarcodeRef like '" & strText & "*'" End If
I am trying to populate a list box with an event after update in a combo box. I can get the formula to work using 2 criteria, the problem is i nee to add a third criteria. When I try to add it I get the run-time 13 error.
Here is the code I am trying to use:
Private Sub cboStatusRFQ_AfterUpdate() Me.cboSupplier.RowSource = "SELECT DISTINCT [Consolidated_Master_Req_Pool.RFQ Contact] " & _ "FROM Consolidated_Master_Req_Pool " & _ "WHERE consolidated_master_req_pool.Complete = FALSE AND [Consolidated_Master_Req_Pool.RFQ Supplier] = '" & Nz(cboStatusRFQ.Value) & "'" And "[cosolidated_master_req_pool.Status] = '" & "[SUPPLIER_RFQ FOLLOW-UP]" & "'" & _ "ORDER BY [Consolidated_Master_Req_Pool.RFQ Contact];" Me.cboSupplier = Null End Sub
I have a table which contains 2 fields. UserID and FullName..Each employee is assigned a barcode (UserID) and what I would like is when they scan their barcode into the form their name comes up. There is a second table containing records of documents and I am hoping that this form will allow an employee to scan their ID, their name comes up, scan a document and the title of the document comes up, there would be a current date box and then that whole transaction is saved as a record in another table. Long story short I want to know who is accessing what records and to have it logged.
I am trying to open a form from my main form and populate fields from one to the other (then press a button).if the form is opened in dialog mode then the code won't run to populate the form (until it is closed or not visible).
The main form is showing an address, but the user can click a button to amend this. Once clicked, the Property Form is opened - I don't want the user to need to fill in all the address details again. I want this pulled through from the main form so the user can make an amendment, then save the new address.
Code: DoCmd.OpenForm "frmPropertySearch", , , , , acDialog With Forms!frmPropertySearch .Form.Visible = False If Not IsNull(Me.Building_Name) Then strBuildingName = Me.Building_Name .txtBuilding_Name = strBuildingName End If End With
On a command button in pfrm_AddClientDuplicateCheck I have the following code.
Code: Private Sub cmdAddNewClient_Click() DoCmd.OpenForm "pfrm_AddClientPrimary" DoCmd.Close acForm, "pfrm_AddClientDuplicateCheck" End Sub
This works great
On the onOpen event of the pfrm_AddClientPrimary form I have this code
Code:
Private Sub Form_Open(Cancel As Integer) Me.FirstName = Forms!pfrm_AddClientDuplicateCheck!txtFirstName Me.LastName = Forms!pfrm_AddClientDuplicateCheck!txtLastName Me.SocialInsureanceNumber = Forms!pfrm_AddClientDuplicateCheck!txtSOcialInsureanceNumber Me.FirstName.SetFocus End Sub
This fails on the first line with this error Run-time error 2147352567 (80020009) You can't assign a value to this object
I am aware of the incorrect spelling of Me.SocialInsureanceNumber this is the way it is in the db.
I have two tables - Interviews & Placements.these tables have multiple foreign keys which pull information from other tables (CandidateID,ClientID etc). I have designed queries and forms (datasheet view) which display all the values that I need, For example:
The interview form shows the following fields: CandidateName;Company;consultant;1stInterviewDate; 2ndInterviewDate;Offer;Accepted
the placements form shows the following fields: PlacedCandidate;Company;Consultant;PlacementDate;F ee;
This query "qry_Interviews" populates these forms using the foreign keys:
CandidateID from candidates table CompanyID from companies table consultant from consultants table
Ideally what I'd like to happen, is when the "accepted" field is updated on the interviews form, the placements form opens as a pop up and is auto populated with the values (CandidateName;Company & consultant).So far I have tried setting the value directly, i.e on the "on Open" event of the Placements form I entered:
This does not work. Should I be populating the placements form with the actual Foreign key values rather than the resolved names? Ideally I'd want the pop up placements form to display the actual names rather than just ID numbers.
I have a form in which job times for individuals is entered. As the data is entered, a macro fires to calculate various costs (Nat Ins/Pension/Total cost etc etc), and that data is stored in a table.
I now have written code to enable the inputting of the data into the database directly from the Excel sheet in which the data is first entered - this is great as it cuts out a data entry repeat and will be a big big time saver.