Dynamically Create N Fields Based On User Input

May 31, 2015

I run a charity pre-school and have invoices to send out. Some of the parents cant afford to pay the whole amount in one go, so we give them a payment plan. e.g. If an invoice is for a 6 week term we let them pay weekly. So I have a check box on my form to say "are you on a payment plan".

Then - I have an free form input box..."How many payments..." and the answer may for instance be '6'.

What I want to do now is dynamically create/display 6 date fields, to record what the agreed payment dates are.

but maybe the answer is 4, or 7, etc. So I need to create/display the correct number of payment date fields.

View Replies


ADVERTISEMENT

Reports :: Create Consecutive Numbers In A Row Based On User Input?

Jul 31, 2013

I have list of candidates shown in report. I need each candidate to have a unique number based on user input. And this number increases by 1 for the rest of the candidates in the report.

Example is below:

If user enters 1132 in the user input box then the numbers shown in report should be as below:

Name Assignment Number

Felicity Thomas 1132
Andrew Sen 1133
Andy Luker 1134

Similarly if number entered is 2345 then the numbers shown in the report will be:

Name Assignment Number
Felicity Thomas 2345
Andrew Sen 2346
Andy Luker 2347

View 1 Replies View Related

Dynamically Create Text Fields In Form And Fill Data

Mar 30, 2007

I want a help on this complicated issue:

On running a select query with "a*" of names in a table:
Results are : America, Argentina

Now I want this to dynamically create 2 text fileds in a form and fill America &".snp" in first and Argentina &".snp" in 2nd filed.

It is not regarding subform to display data of query result.

This I am going to use to add attchment for outlook email session as being discussed in my Email from access with attachment thread.

View 2 Replies View Related

Queries :: Dynamically Add Fields To SQL Or Query Based On Form Selection

Nov 6, 2013

Is it possible to add a field (i.e., variable) to a query (or SQL programming) based on a form selection?For instance, if I use a form to allow an end-user to specify which fields they wish to include in the query (essentially creating a UI for the query builder), how would I go about creating the query/SQL or updating the query/SQL?

View 3 Replies View Related

User Input To Search Database And Create Report

Sep 9, 2004

I have a database that I created that uses a form to fill out information about server builds. I contains information about who built it, the IP address, server name, etc. I want to be able to create a dailog box that allows the user to input a server name to query the database and create a report based on that input. And if the user input isn't found in the database, a dialog box comes up with some sort of error message. I am still pretty new to Access, so the more detail you can give me the better. Thank a lot.

View 1 Replies View Related

Queries :: Query That Uses Different Columns Based Upon User Input

Sep 10, 2013

I have a database table in which I'm trying to pull sales data and generate sales reports from. The problem I face is that the sales data is recorded into a table with this structure:

Year | Customer | Sales_Month_1 | Sales_Month_2 | Sales_Month_3

Rather than having a single field "Month" in which I could set criteria or prompt the user to select a month to derive sales data from, I need to write a query that through user input (or through some code within the query) the right field will be selected. An example of this would be generating a report for the 1st month of the year, obviously.

View 1 Replies View Related

Modules & VBA :: Update Recordset Based On User Input Box

Oct 13, 2014

I have a form in my front end database that is supposed to allow a user to search for a record based on account number and then make changes to the that record and for it to save in the back end database. I have the search function working where it populates different input boxes on the form with what is stored in the back end database but I cannot get the update function to work. I have tried to assign each input box with a variable and then run an Update SQL function to update each of the fields but the updates are not storing. Any example of a successful update statement that uses VBA variables in it or a way to update a specific record via a recordset type function?

View 8 Replies View Related

MS Access Date Filter Based On User Input?

Dec 12, 2011

I have query in MS access which does date filter based on value given by user.

SELECT *
FROM Table1
WHERE ((DateValue([Table1].[Date_col])
Between "#"&[Forms]![Frm1]![Date1]&"#"
and "#"&[Forms]![Frm1]![Date2]&"#"))

But this gives empty output

View 1 Replies View Related

Show Records In Query Based Off User Input In Form

Nov 3, 2005

Ok this might be basic stuff i'm a bit dumb

I have a query showing lots of records of equipment that is in different rooms. I would like to have a form where the user can bash in a room number and all the records from the query that have that room number in it pop up.

Please help the dumb

View 3 Replies View Related

Export Part Of The Table Based On User Input Via Form

Aug 23, 2006

hi everybody, im have a database with table called "project". there are many column in this table. my user want to export this table to Excel, but only some of column, with particular order ( depend on him) to analyze in Excel.
he asked me to build a form with a list box, drop box,somthing like this, so he can choose what column to export in what order.
i try to make a query like this: " Select Forms!UserInput.combobox1.value , Forms!UserInput.combobox2.value,etc, From Project" but it wont work.
Dou you have any idea.
thanks in advance

View 2 Replies View Related

Modules & VBA :: Search 1 Field Based On Multiple User Input

Jul 4, 2013

I have a search form that looks up a value in a field and lets the user know if it is there or not, they have now asked to put in multiple values to search... eg. searching containers number, I will put user input box where they can put these numbers

NYKU023561
TRLU102356
TCNU123023

This will search my container number field and show a pop up message box saying..
Please note below
NYKU023561 - has been found you cannot use this container
TRLU102356 - has not been found please check internal system
TCNU123023 - has beeen found you cannot use this container

Below is the basic search I had before which was all I needed.. how can I adapt this?

Code:
Private Sub Command256_Click()
If (CntSearch & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Dim CNT As String

[Code]....

View 4 Replies View Related

Modules & VBA :: Use Different Column Based On User Input To Update Data

Jun 29, 2015

I'm attempting to build an import module so that my users can take data from different walks of life and import it into my tables. I'm doing this by setting up a module and allowing the user to specify which column data will come from when importing data. So lets say I have a field that is CustomerID in my table and user one pulls data from 1 place and in his excel or csv file, customerid is in field 1. Another user does the same thing and its in field 2.

How can i make some form of a loop that when I'm attempting to update data, i pull the correct column?

strSQL = "SELECT * FROM tblImportTable"
Set rst = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
With rst
Do While .EOF = False
If IsNull(DLookup("DefaultValue", "dbo_tblImportTemplateDetails", "Template_ID=" & Forms!frmImport!TemplateName & " AND FieldName='CustomerID'")) Then

[code]....

View 6 Replies View Related

Modules & VBA :: Update A Table With Dates Based On User Input

Dec 30, 2014

I am new to VBA and I'm trying to write a query that will update a table with dates based on user input. For example a user will run data each Monday and that date will be day01. The date table has 28 days total and I need each day row to update with the next date i.e. day01 is 12/30, day02 is 12/31, day03 is 1/01 etc..I am having issues just running the update the query. I get a too few parameters error message on the strsql statement. There are only two columns in the table, order_day(date column) and date_value(text). I want to update order_day. I also need creating a loop so it knows to go back and add days to the other values.

Here is what I have:

Code:
Sub Update_Dates()
Dim rs As Recordset
Dim db As Database
Dim lmsg As String
Dim transactiondate As Date
Dim strsql As String

[Code] ....

View 6 Replies View Related

Reports :: Sorting And Formatting A Report Based Off Of Values And User Input?

Jul 1, 2013

I'm trying to make a report that a untrained user can use to review the relevant data from the database I'm creating. All of the work I've done so far has been directly in the tables . Here's a quick outline of my general data organization:

Department:
DepartmentID(PK)
DepartmentName

Employee:
EmployeeID(PK)
EmployeeName
DepartmentID(FK)
Needs_Work (check box)

[code]....

Basically, I want the user to select a department to view using a combo box or option group (which I'm not sure of how to do in a report). Then, I want to view the employees within that department sorted first by whether or not the Needs_Work check box is selected, and then by how many of their competencies are unchecked.

View 2 Replies View Related

Tables :: Auto Calculation In Sum Field After User Input (numbers) In Fields

Dec 28, 2012

I have a table, at the table I'v got these fields:

ID | num1 | num2 | sum

I want that the user put numbers at 'num1' and 'num2' fields and then the 'sum' field will calculate automatically the operator (sum=num1+num2).

I've tried to put any combination at 'Default value' of the sum field (all the fields are numbers , also tried to change the sum field to text...nothing works).

I'm getting a message that 'num1' field is not recognize at the table

(I tried =[num1]+[num2], without the '=', num1.table+num2.table , ...nothing works)

I also tried to do it with SQL command but it dosn't work.

There is any way to do it, is it possible? Or other way to do it at least at Form or at Report ?

View 7 Replies View Related

Forms :: Create Set Number Of Identical Records Based On User-defined Text Box

May 12, 2015

I'm trying to create a database for a construction company, as an experiment more than anything, and my problem is this:

I need to create a set of identical records in the table "buildings" based on the information entered into a text box by a user on the form for registering a new project. I want each record to be identical except for the "plot number" field, which I want to start at one and increase to the number of buildings defined in the text box.

"Projects" is one table and "Plots" is in the other.

View 1 Replies View Related

Tables :: Limit Data Input Based On Another Fields Criteria?

Dec 22, 2014

I have two tables linked by ID (Table1,Table2)

The Table1 holds data that is a request for a task.

ID, Request, Task_tms (the number of times the task is required to be done)

1, Make a cup of coffee,15

Table2 is my allocation of people to the tasks.

ID, Person, Task_done (the number of times this person has done the task)

1,Sally,10
1,Eddie,5

What I want to do is to limit the amounts of allocation in some way (ie in this case if I have already put 10 for Sally then I would be unable to put anymore than 5 when entering the amount for Eddie.

Additionally if I were to allocate all 15 to Sally then no additional people would be able to be allocated to this task (ID 1)

The two table are in datasheet format linked on a form.

View 1 Replies View Related

Reports :: Create A Form Which Filters A Report Based Off Of Combo Boxes Selected By User

Jan 2, 2014

I'm trying to create a form which filters a report based off of combo boxes selected by the user. The code I'm using currently is:

Code:
DoCmd.OpenReport "rptProgramAttendees", acViewReport, , "ProgramIDFK = " & cboProgramTitle

This works great to return a report if the user selects something from the combo box. How do I adapt this so that the user can also leave the combo box blank and filter the report to return all records?Additionally, what if I want to have the user filter between dates selected on the form; i.e. between 'txtStart' and 'txtEnd'

View 10 Replies View Related

Create A Table Based On 2 Tables With Different Fields

Apr 17, 2007

Hello,

I have attached a zipped excel workbook to best describe what I'm trying to do. I have table1 and table2 and I'm trying to write a query in access to get the output as shown in the workbook. I'm having hard time getting this right. I would appreciate your help if possible. Tks

Richard

View 4 Replies View Related

Forms :: Based On User Selection In A Form / Create New Records For Subsequent Form

Feb 3, 2014

The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.

The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.

View 6 Replies View Related

Forms :: Restrict User Input In Textbox Depending On What Option User Has Selected

May 22, 2013

I am building a form in access and I am trying to find a way where user input isn't possible in the associated textbox when "No" from on option box is selected.

View 3 Replies View Related

Queries :: IIF Statement Expression - Create Alias Column Based On Data From Two Fields

Jun 20, 2013

I am writing a very complex 'if statement' query expression. I need to create an alias column based on data from two data fields.

Here's the logic:

True: If [PP] = "WG" or "WS" or "WL" and If [GR] > 10 Then "Skilled" or
[GR] Between 6-9 Then "Semi - Skilled" or [GR] <6 Then "Unskilled"

False: "GS"

View 2 Replies View Related

Queries :: Create A Query Dynamically From Vba Using A CreateQueryDef Statement?

Nov 19, 2013

I can create a select query with a combo box in it by changing the property of one of the fields - making the display control to combo box and adding the values. No problem there.

What I want to do is to be able to create a query dynamically from vba using a CreateQueryDef statement.

The problem is that you can only pass an SQL string to CreateQueryDef, and the combo box values are not part of the SQL code, but are saved with the query (presumably the same way column layout gets saved).

Is there a way to create a query with VBA and include non-SQL layout criteria so I can have combo boxes?

I'm using Access 2002.

View 6 Replies View Related

Modules & VBA :: Dynamically Create Headers In Excel Sheet Using Access Table Data

Apr 2, 2014

I have an access table and I want the code that will check two columns in the table "EnvelopeType" and "EnvelopeSize" and create headers in Excelsheet automatically. In the attached workbook, like in sheet1 the headers are already appeared, I want this to be done dynamically using vba code so that if new values get inserted in EnvelopeType and EnvelopeSize then we won't have to change the code to display more headers.

Please see attached workbook named Sample and Access table. E.g.

EnvelopeType EnvelopeSize
TNT 2nd Class C5
PP1 2nd Class C5
PPI 1st Class A4
Recorded A4
TNT 2nd Class C5
PP1 2nd Class C5
Recorded A4
PPI 1st Class A4
Recorded C5

With the code it should display following headers in excel sheet:

TNT 2nd Class C5
PP1 2nd Class C5
PPI 1st Class A4
Recorded A4
Recorded C5

View 14 Replies View Related

How To Pull Records Based On Input And Input-1

Sep 22, 2015

I need to be able to query the service dates for the bill. So I can query 1509 for the .billYYMM and .readdate and it will give me the TO Date. How do I in the same query tell the query to subtract 1 from the BillYYMM that I just entered and give me the read date for that field in that query? So Query 1 MBRHISTDETL.BILLMOYR and in the criteria box use [Enter the Bill Month Year YYMM you want to search for] will allow me to run the query at any time for any bill month year that I enter. So another field in that query is MBRHISTDETL.READDATE. So to get the FROM date and the TO date i need the following MRBHISTDETL.BILLMOYR (whatever I enter as input) and MBRHISTDETL.READDATE that corresponds and then I need [MRBHISTDETL.BILLMOYR]-1 and MBRHISTDETL.READDATE. The first gives me the TO date and the 2nd gives me the FROM date?

View 5 Replies View Related

Reports :: Dynamically Include Columns Based On Check Box

May 28, 2013

I have a report with many columns in the detail listing data, and their associated titles above in the page header.What I would like to accomplish is the ability for the user to check boxes off on a form which will remove/add specific columns to the report. The form will essentially be a "build your report" style, with a button on it opening the print preview of the custom report.

Im assuming this is accomplished by the "on load" part of the form through VBA. How is the sizing handled? If the user un-check's a box to remove a column of data, how is the header and detail data "moved over" or re-arranged to accomplish a relatively decent looking layout? Any example or example code to deal with one column/setup (which I can copy and modified)??

View 4 Replies View Related







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