Autocomplete Fields in Split Database - ms-access

I created a data entry from and split my database to front-end and back-end. When I enter in data I want certain fields to autocomplete. To be specific, I want to do something like (assuming the term Request had been previously entered) when you type in Requ... it would show Request and you could just press enter or tab to move to the next field. I don't want the rest of the fields autofilled, just individual fields autocompleted. Not sure if the fact that the database is split prohibits this?

Using a form, set the controls for the fields you want to autocomplete to comboboxes and the row source of the combo to a select from the table:
Control Source : MyFieldToComplete
Row Source : SELECT DISTINCT MyFieldToComplete FROM MyTableWithMyField
Limit To List : No
There are wizards for building combos, or you can change controls manually with right-click.

Related

How to maintain the current slice selected by the user in webdatarocks report?

I am using the WebDataRocks reporting tool in asp.net core razor view, the user specifies some form inputs to filter the report with, and clicks show report to display the report, and when the user selects additional fields to be displayed ( from the report "fields" option in the report toolbox), and click show report again ( may he changed the filtration inputs), the newly selected fields disappear and display the fields based on the specified slice at the beginning, Is there a way to save the last selected fields (slice) by the user with the subsequent requests to display the report?
The Fields List does not save its state after some field or measure is added or removed. To change the slice, press the "Apply" button inside the Fields List.
Also, you can use the following API calls to implement a custom Fields List where all the changes are applied immediately:
getRows, getColumns, getMeasures, getReportFilters - get the
current slice configuration
getAllHierarchies, getAllMeasures - retrieve all the data about
fields
runQuery(slice) - modify the slice in runtime. Contains
rows, columns, measures, and reportFilters options from the slice
object

Drop down list in access form and displaying the data from the next column

Please help me with the following topic.
I'm having a hard time inserting a form in which i need to select from a drop down list the name of the project and below to display the data from the ProdFinit column.
I've tried using combo but i'm new to Access and i thing i'm missing something.
Thank you for your help!
You're on the right path using a combobox. Look at the format tab on the design properties for your combobox. Here I have a form where the user inputs the zip code, but I also want the user to identify the city and state at the same time. My column count is 3 and I chose how wide to make those columns on the next line down. Beware what column to bind it to on the datatab of the properties box. I find binding it to column 1 is easiest.
ComboBox Properties
Zipcode Combobox

Input mask in Access database

I have a field with a customer ID that should be in the format of C0000000001, where it has a letter at the start and up to 10 numbers after the letter with leading zeros between the letter and the number. I want the users to be able to put in C1 and have the table save C0000000001 or C1234 and have the table save C0000001234.
I want the restriction to be on the hard data in the table. The table should contain the full customer ID but I only want the users to have to enter the C and the number of the customer when entering/searching for customers. I am using Access 2010.
I believe that the first character will always be a C, but either way, it would only be one alpha character if it wasn't.
I understand what you are saying, but the majority of the data (thousands of records) are going to be from another system that stores them that way. Doing it this way limits my margin of error. Otherwise, exports from the other system will need to be manually changed prior to being imported into the database and vice versa.
Searching would only be on existing records that will be saved in the C0000001234 format, but I would like user to be able to omit the leading zeros when entering the search criteria.
This question, combined with your previous question here, suggest to me that you are trying very hard to have the data structure in your Access database exactly match the legacy system from which you receive bulk updates. That may not be necessary, or even desirable.
For example, instead of maintaining the CustomerId as Text(11) (as in the old system) you could store it in your Access database as
CustomerIdPrefix: Text(1), and
CustomerIdNumber: Long Integer or perhaps Decimal if the numeric part really can exceed 2,147,483,647
Your Customers table in Access could also include a calculated field named CustomerId as
[CustomerIdPrefix] & Right("0000000000" & [CustomerIdNumber], 10)
to give you a single 'C0000012345' value for display purposes.
For searching, your form could have a Text Box for the Prefix (default value: 'C') and another text box for the numeric part. The search could then use a condition like
[CustomerIdPrefix] = txtPrefix.Value AND [CustomerIdNumber] = txtNumber.Value
or, if the user wanted to create a Filter on the Form (or Datasheet View) it would probably be sufficient to just filter on the number part.
If you ever needed to feed information back to the legacy system you could just export a query that includes the [CustomerId] calculated field (and omits [CustomerIdPrefix] and [CustomerIdNumber]) and you'd be fine.
My suggestion would be to use forms with associated queries using the FORMAT function.
You do need to clarify where you want this implemented, but I'm going to assume you have a table set up and that you would like to be able to enter/search data from a form.
I'll create one form for input frmAdd. For the input form, I created a query that would run when a button on the form was pressed. Add two text boxes newID and newOther to the forms which are unbounded but which the user can use to enter data. The query will then pull that data and append it to your table in an altered format. Here's the SQL for that query:
INSERT INTO Customers ( [Customer ID], [Other Field] )
SELECT Left([Forms]![frmAdd]![newID].[value],1)
& Format(Right([Forms]![frmAdd]![newID].[value],Len([Forms]![frmAdd]![newID].[value])-1),"0000000000")
AS Expr1, Forms![frmAdd]!newOther AS Expr2
FROM Customers;
I'm not sure exactly what search functionality you're looking for, but this query would pull up the record data matching that of a frmSearch with a textbox search which would have the format C### or whatever entered in:
SELECT Left([Customers].[Customer ID],1) & Replace(LTrim(Replace(Right([Customers].[Customer ID],9),'0',' ')),' ','0')
AS Expr1, Customers.[Other Field]
FROM Customers
WHERE (((Customers.[Customer ID])=Left([Forms]![frmSearch]![search].[value],1)
& Format(Right([Forms]![frmSearch]![search].[value],Len([Forms]![frmSearch]![search].[value])-1),"0000000000")));
Applying the input mask is just a way to ensure that your data is correct. If you feel the need to use one, go to the table in Design View and click on the Data Type box for the customer ID field. Find Input Mask under Field Properties -> General and click it. Then hit go to the toolbar -> Design tab -> Builder. This will walk you through it.
Input mask is not the answer for this. Input mask forces the user to input the data in a certain manner. What you need is some VBA code to run in the AfterUpdate event on a form. There's no way within the table to force the data into this pattern allowing the input method that you've requested.
There may be a more efficient way to do this, but this does the job.
http://pineboxsolutions.com/access/customeriddemo.accdb

Passing Parameter to next form starting with parameter input dialog

I'm trying to create a database that is user friendly. So far I've developed two forms.
Form 1 shows an overview of orders. Form 2 shows the details of a specific order. Form 2 is build on a query that retrieves information from different tables.
When I open form 2, a parameter input dialog box appears asking me which ordernr he has to look for. When I type in a number, the specific details from that record are shown.
Now comes the tricky part. form 1 shows the overview. When i click on an ordernr a textbox is filled. I did this to confirm the program reads the right number.
My question: How do I get the number from my textfield in form 1, into the parameter input dialog in form 2? The numbers are stored as text so no conversion is needed.
I saw a lot of solutions with DoCmd.OpenForm "Formname" ,,,,,, OpenArgs. I do believe this can be the sollution. I just don't know how to get OpenArgs into the Parameter Input Dialog.
Thanks for helping!
Change the query of the second form to have the value of the text box that you populate as a filter on the ordernr field. You might also to set the 'Modal' property of the second form to 'True' as this will prevent (or hinder at least) unsynced forms.

Updating two or more tables in access

I have two tables which both include a Yes/No type column. I wish to update both these columns using one form.
I do not want to use a subform design because I only want a few fields to show up in the form, not all fields from both tables.
Here is a description of a form/subform approach which you may be able to build on.
Save this query as qryCustomers:
SELECT
cust.CustomerID,
cust.Title,
cust.LastName,
cust.Postcode,
cust.CardNumber,
cust.ExpDate,
cust.SecurityCode
FROM CustomersT AS cust;
Save this query as qryBookings:
SELECT
bk.BookingNumber,
bk.CustomerID,
bk.DateBooked,
bk.Nights,
bk.Price,
bk.Total,
bk.CheckInDate,
bk.CheckedOutDate
FROM BookingsT AS bk;
Create a new form which uses qryBookings as its records source. Choose "Continuous Forms" as the Default View property from the Format tab of the form's property sheet. After you add and arrange the data fields as you wish, save the form with the name fsubBookings.
Create another form which uses qryCustomers as its record source. Choose "Single Form" as the form's Default View property. Lay out your form's fields then add a subform control. Assign fsubBookings as the "Source Object" property (find that property on the Data tab of the subcontrol's property sheet). Use CustomerID for both the "Link Master Fields" and "Link Child Fields" properties.
Cross your fingers and switch the main form from Design to Form View. Hopefully you will see information for one customer in the main form and any bookings for that customer displayed in the subform. You can add new bookings for that customer in the subform.
If this suggestion proves to be a reasonable starting point, you can later adapt it to include what you need from RoomTypesT. But for now, I tried to keep this as simple as possible.