Forms :: Date In Combo Box In Form

Jan 19, 2014

i am looking to generate a list of dates in a combo box. I want the dates to be from 1 week ago to today. And all other attempted entries to be invalid. This means the user could only select one of those dates, with any other entry returning an error

View Replies


ADVERTISEMENT

Forms :: Filter A Form Based On Date Selected From Combo Box

Dec 29, 2013

I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.

the code is:

Sub SetFilter()
Dim LSQL As String
LSQL = "select * from Preventive_Q_View"
LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"
Form_Preventive_View.RecordSource = LSQL
End Sub

How do I modify this code to work with the date combo box? Also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?

View 1 Replies View Related

Forms :: Change Record Source Of Combo Box On Form Based On Another Combo Box

Mar 31, 2014

I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.

So my questions are:

1) can this be done
2)If it can be done, how can I do it?

View 3 Replies View Related

Forms :: Filtering A Combo Box On A Subform From A Combo Box On A Main Form

Apr 27, 2013

I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:

Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;

The subform is called Stock Subform witha combo box called ProductID with the following:

Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName;
Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

[code]..

The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.

View 11 Replies View Related

Forms :: Set Date After Combo Box Update?

Nov 19, 2014

I've got an Access 2010 database based on the Tasks template. I've added a column to the Tasks table called "CompletedDate" I'd like for the Status combo box on the Task Details form to update the Completed Date for that record.

i.e. so when the Status is set to completed, it auto completes the Completed Date with the current date.

I've tried using an OnChange and an afterUpdate statement on the Status box but I don't seem to be getting anywhere.

View 4 Replies View Related

Forms :: Using Dcount With Combo Box And Date Range?

Jun 13, 2014

I would like to have a text box display the number of records for a selected title that fall within a selected date range. Been looking around for a while and have this so far;

=DCount("Discussion_Title","Discussions","[Discussion_Title]='" & [cboType] & "' And [Discussion_Date] = Between ([txtStartDate] And [txtEndDate])'")

I get an #Error message. I just threw that together because it describes what I want, but I know there are syntax problems.

View 4 Replies View Related

Forms :: Using Combo Information To Look Up Price Via Date?

Dec 27, 2013

I have a database I'm creating for DVD/blu-ray sales. I currently have a order system in place in a subform, which uses a combo box to find the customer and fills in all the information in the rest of the subform. One piece of information is the date of sale.

I need to be able to have the ability to change the price of the DVDs and have a history of sales with the right price. The easiest way to do this seemed to be by Date of sale. So the price is linked to the date of sale, when the price changes, all orders before that change use the old price, after use the current price.

I was wondering if there is anyway to have a second subform on the same page and us the date of sale from subform1 and have it display the price in the second subform?

View 7 Replies View Related

Forms :: Todays Date On Textbox Based On Combo Box

Sep 2, 2014

I have a "Status" combobox, I'd like the "Date Case Closed" field to auto fill today's date when "Status" combobox = Closed. The way I know how to do this is by using an IIf with Date() function, but, if I do that, the date is gonna keep changing everyday. Do I have options to do this?

View 3 Replies View Related

Forms :: Filtering List Box Using A Date Rage And Combo Selection

Jan 5, 2014

I am using this code to filter a List Box based on a Date range and a Combo Box selection:

Code:
Private Sub Combo139_AfterUpdate()
Dim StrgSQL As String
StrgSQL = "SELECT [User Name], [Date Of Request], [Description of Problem], Status, Sub_Job FROM QRY_SearchAll " & _
"WHERE [Date of request] BETWEEN #" & CDate(Me.txtStartDate) & _
"# AND #" & CDate(Me.txtEndDate) & "#;"
StrgSQL = StrgSQL & " WHERE Sub_Job = Combo139"
Me.SearchResults.RowSource = StrgSQL
Me.SearchResults.Requery
End Sub

However, It is not working. when I click the Combo box the List Box comes up blank.

View 13 Replies View Related

Forms :: Set Date Depending On Choice From Combo Box / Option Buttons

Mar 30, 2015

I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.

The variables are 'Payment in 30 days" " Payment upfront"

if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date
if "payment upfront" is selected the field on the form will enter todays date.

This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.

I've tried a few different ways to enter this but i can't quite get it to work as i want.

View 3 Replies View Related

Forms :: How To Filter Reports By Date Types In A Drop Down Or Combo Box

Jun 26, 2013

filter reports by specific date types in a drop down or combo box I would like the dates to be

Today
Tomorrow
The next 3 days and the next 7 days

i don't want a date picker or between dates I have tried searching but cannot seem to find an answer They are for my engineers, they want to know what callouts they have today or tomorrow or the next 3 days or this week.

View 3 Replies View Related

Forms :: Form Auto-populates Date Field - Want To Add Check Box To Enter Alternate DATE

Nov 1, 2013

We use access to enter our service tickets in at work.What we have are three date fields.

Call Date
Start Date
End Date

We are 24/7 operation.Currently all 3 just autopopulate with the current date.What i would like to do is ADD a CHECKBOX next to each Date Field.And make it work like this.

1. let them autopopulate as they are currently
2. if you end the call AFTER MIDNIGHT (the next day). CHECKING the box would automatically populate yesterdays date in each of the fields that has the check box CHECKED

View 3 Replies View Related

Forms :: Auto Populate Date In Field Based On Selection In Combo Box

Mar 11, 2015

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.

View 8 Replies View Related

Search Date Range By Month In Combo Box Within A Form?

May 25, 2012

I'm trying to create a combo list box in a form that has all 12 months (January, February......etc,) listed in rows, and depending on the selection will bring up only that particular month within a range of dates from a table. I don't want it to look at the day or the year, but only the month.

Example: I select January from the drop down list in my combo box and my form will display all records with dates that are in January regardless of month or year.

View 4 Replies View Related

Forms :: Combo Box To Allow A User To Select Date And Relevant Work Details Appear In Subform

Jun 10, 2013

I have created a simple database, with 2 x tables. The first is a 'Week Ending' table, with a dateid key and Week Ending field. I have created several week-ending dates in order for a user to input details of work done the previous week. The second table contains the details of the work.

I have a one to many relationship between the dateid in the first table, and a dateid of the work details table.

I created a query based on the work details table, and created a subform from that. In a main form I linked a combo box to allow a user to select a date and the relevant work details appear in the subform. However the Week Ending field only shows one date, not a list of the dates I created.

View 7 Replies View Related

Forms :: Opening A Form From Another Form Via Combo And Auto Loading Form Data?

Apr 14, 2015

I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.

The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.

The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.

View 9 Replies View Related

Use Combo Box Of Date Received So User Can Select To Display Receipt Form

Jan 12, 2013

How to use combo box that drops down the date received from which the user can select todisplay "receipt form" on and after that date. [need to use macro]

View 4 Replies View Related

Forms :: Opening Form Based Off Another Forms Combo Box Value

Nov 5, 2013

I'm trying to get a combo box & button to work together. On the main form of the attached database, I just want the button to go to the associated record based off my selection (or entry) in the combo box.

I've tried the following:

- Looked through the Northwind sample database for a close example. Tried my best to replicate the functions but it didn't work
- Looked through other examples posted and tried to manipulate the code to no avail
- Tried using [Forms]![Main Form]![cmbLastName] in both the filter & criteria section of the macro

View 4 Replies View Related

Forms :: Value From One Form To Combo Box Into Another

Dec 16, 2014

I am taking a value from one form into another. The value I am taking needs to select an item In a combo Box.

So far I can move the value to the new form but cant seem to copy the value into the combo box.

Private Sub Use_By_Date_Click()
Dim Partno As String
Partno = Me.Form.TRAN_ItemNo
TRAN_ItemNo = Partno
'MsgBox Partno
DoCmd.OpenForm "Frm_Stock_Transactions"
DoCmd.GoToRecord , , acNewRec
End Sub

This works but then I have tried:

me.Component Value = Partno
me."Frm_Stock_Transactions"."Component Value" = Partno
Form."Frm_Stock_Transactions"."Component Value" = Partno

And various combinations of the above but cant seem to get it right.

View 2 Replies View Related

Forms :: How To Add To Combo Box On A Form With VBA

May 9, 2013

I want to add a series of strings to a combobox on a Form using VBA. I can add one string but how do I add more. The one I see is the last one entered, how do I add more than one string to a comboBox

View 2 Replies View Related

Forms :: Open Form From Combo Box

Jun 3, 2014

Im using the below code to open a from depending on what option is selected on a combobox.

Code:

Private Sub DirectPCombo_Click()
Dim cboVal As String
Dim stDocName As String
cboVal = Me.DirectPCombo.Value
Select Case cboVal
Case "One"

[code]....

If you select the first item [One] it will open the correct form [TestOne]. But when you select any of the others an error comes up saying that the name is no a form. So I added

Code:
DoCmd.OpenReport stDocName

But the no items would select.I know If split the reports form the forms and make two comboboxes it would work, but it would be better it both could be in the same combobox.

View 2 Replies View Related

Forms :: Data From Form Combo Box

Jul 12, 2014

I have a form for adding new bookings to a database, as well as the original form for adding the passengers.

I have created a combo box on the 'add booking' form which brings a drop down of existing passengers to choose from under the 'surname' field. However it was not assigning the bookings to the passenger on the 'add passenger' table.

I changed the control source of the form property to the Customer ID (the autonumber) and the bookings now seem to be linking to the passengers. However the 'surname' box in the table is empty - if I change the control source back to 'surname' then the bookings stop linking again.

View 14 Replies View Related

Forms :: Form Combo Box Calculation

May 30, 2013

I have a combo box on a form that is liked to a table (current). That table has a list of available items and a count at the end of it. For example, apples, bananas, strawberries, blueberries, 4. Is it possible to have the combo box on the form subtract 1 from the count when an item is selected from the list? So when apple is selected the count of 4 is changed to 3.

View 4 Replies View Related

Forms :: Filtering A Combo Box On A Form

Jan 21, 2014

Im having trouble filtering a combobox on a form. I have two Comboboxes, one is called (FleaTickWorming) depending on what is elected in this cobo, will deside on what is available in the other combo which is called (Product). The form is a continuous form. The filtering works, in as far as it changes the list each time, but it also deletes the item that I have chosen on previous records if the list is different. My code is as follows:

Code:
Private Sub FleaTickWorming_BeforeUpdate(Cancel As Integer)
If Me.FleaTickWorming.Column(0) = 1 Then
Me.Product.RowSource = "qry_FleaProducts"
ElseIf Me.FleaTickWorming.Column(0) = 2 Then

[code]....

View 3 Replies View Related

Modules & VBA :: How To Check For Start Date In Date Range Only Combo Box Value

Jan 22, 2014

I have some code that filters job raised I have 2 text box's txtdatestart and txtenddate after entering. date range between the too text boxs it shows me all job raised with in the period.i have entered what I would like is filter it again by client field using combo box cboclient so if the user enter's client name in cboclient combo box and date range in txtdatestart and txtenddate it will only show jobs raised with in the date range of the client enter in the combo box but if the combo box is empty show.

Code:

Private Sub cmdPreview_Click()
'On Error GoTo Err_Handler 'Remove the single quote from start of this line once you have it working.
Dim strReport As String
Dim strDateField As String
Dim strWhere As String
Dim lngView As Long
Const strcJetDate = "#mm/dd/yyyy#" 'Do NOT change it to match your local settings.

[code]....

View 6 Replies View Related

Forms :: Using Combo Box To Fetch Information On A Form

Aug 13, 2013

I have a form that is used for data entry; from there I want to create a new form where I can select a field from a combo box which would generate the amount associated.

Example on the first form it has a Carpenter that has a calculated output of $1000, on the second form I would want to click on the combo box and pick carpenter and I would like the calculated field to be shown next to it.

I tried making an if statement on an unbound box but I found it difficult

=IIf([Combo2]=Building Service Engineer, =[Forms]![Estimate]![Text787],IIf([Combo2]=Carpenter,
=[Forms]![Estimate]![Text788],IIf([Combo2]=Custodian,
=[Forms]![Estimate]![Text789],IIf([Combo2]=Custodian - Shift Pay (5am - 6am) ,
=[Forms]![Estimate]![Text790],IIf([Combo2]=Drafting Technician,

[Code] ......

[Text787]-[Text805] are fields from the first form, these are calculated fields that multiplies wages quantity etc.

Also [Combo2] wont let me pick any data that I typed in.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved