General :: Using Like Function With Data From A Form?

Dec 24, 2012

I have a ICT exam on databases in January for A2 ICT. It is based on a sixth form college. I need to add new units for the courses via a form, with the unit being uniquely identified using a Unit Code

The Unit Code consists of the first 3 letters of the Subject Code, the first 2 letters of the Description of the unit and a number.

Eg Subject ID : ARA001 and Description: Culture will have a Unit code of ARACU1

I'm trying to find a way to automatically create the unit code on the form. The first two bits have been solved fine,however, i have had difficulty of putting the number of the end. It seems easy in practice as i need to find a Unit Code like the one i have on the form but find the maximum number of a identical code and add one to it. I thought if i did

Like "[Forms]![frmaddnewunit]![txtUnitCode]*" as the criteria on a query with the field being Unit Code from the Unit table it would find data like the one on the form but it doensn't.

I thought i would use the data from the query and use Max(Right([UnitCode],1))+1 to get the number and add this to the code in the unit

This formula on the unit code text box on the form solves the first two bits of the problem

=Left([cboSubjectID],3) & UCase(Left([txtDescription],2))

but i need to find a way to find unit codes thsat exist similar to the ones that are created and then find the maximum number and add one to it so i have a valid unit code

e.g

if on the form i select Subject ID ARA001 and Description Culture

The unit code will display ARACU.

I then need to find unit codes similar to this (There is one that already exists ARACU1) and find the max number on the end and add one to it

So ideally the code that will be automatically generated in this case would be ARACU2

View Replies


ADVERTISEMENT

Table Field Not Accepting Data From Form Function COUNT.

Oct 7, 2005

Table Field not accepting data from the Form function, count.

On the Form with the properties displaying the field, in the Control Source I have the following formula; "= count([OccupantName])

Now this does calculate properly except that the data in not saved to the table field.

Is the above count statement wrong?

Or does this need to be done another way? If so how?

Does anyone know of another way to have the computer count information on a Form that can be saved to a table field?

View 2 Replies View Related

General :: Copy Form Data

Apr 17, 2013

I have a form and a button it to copy the data to save me time when 99% is duplicated Ie If I enter 2 siblings data I fill one out then copy it and only change the siblings name a bdate.Then problem is it does copy the data but locks up the form. I have t X out the form when I do a warning comes up asking me if I want to empty the clipboard of, in short, a massive amount of data. I say yes and then reopen the form and there is the duplicate data ie 2 records.

Private Sub Command163_Click() 'Coppy record Button
On Error GoTo Err_Command163_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

[code]...

View 7 Replies View Related

General :: Autosave Form Using Data PDF?

Jul 23, 2012

I have a database at our company.

When dispatching equipment we enter the address and details onto a form. The data on this form saves into a table.

The form always opens on next record so at the minute for example its 22900.

I would like instead of printing a copy for the company, for a button to click on the form to do the following:

Save "current record" with all data entered by user into a folder on the computer automatically with a file name of ""current date""customername"".

It would save in a folder also called "current date" if this had not already been created i would need the code to firstly create this prior to saving the file as a pdf.

View 1 Replies View Related

General :: Entering Data Into A Form

Feb 25, 2015

I have a form into which I scan a serial number in one of its text boxes, I can then select search and am presented with a report relating to that serial number. All simple so far. Now for the dilemma... The barcode I scan consists of 15 characters like so, 53423PP98765432, numbers-PP-numbers.. the problem I have is that I only need the numbers after the PP's, in other words the last 8 digits. My question is, is there something I could do to make the text box omit the first 7 characters automatically, leaving me with the 8 I need, instead of me having to curser into the middle and manually delete the first 7 characters. I only need the last 8 because of the link with another database that only uses the last 8 digits.

Also, on the device I scan, there are 2 other barcodes, above and below the one I need to scan. If I scan one of the others by mistake, I have to highlight and delete the results to try and scan the middle barcode. The other barcodes also have a different length to the one I need. So is it possible to write some code that says, ok, you have scanned a barcode with 10 or 12 digits, we don't want either of those, so deletes it for me to try again, but then recognizes the 15 digit barcode and auto deletes the first 7 characters as mentioned above.

View 7 Replies View Related

General :: Unable To Enter Data In Form?

Mar 10, 2014

it is zip file unable to get the size lower yet minimal amount in database I have 2 tables and one form when I create an query on the form the form then becomes that I cannot enter data in it or edit etc

View 3 Replies View Related

General :: Enter Data From A Form Onto Two Tables?

Jul 6, 2013

I created a form that allows users to enter data into the fields and populates the table.But can I have it do that and populate instead of one table, two tables?

View 13 Replies View Related

General :: Adding New Data Into Tables (via Form)

Jan 31, 2013

I have 2 tables.

Table one is for person ID
Table two is for number of absences

I created a one-to-many relationship with the update/delete option selected. It didn't work when I wanted to add new data into the tables (via form). Then I tried a many-to-many relationship (with a third table) but it doesn't seem logical to do so, as I only need to add particular data into one table, but need a field from the 1st to differentiate records.

(table 1 = one record per person, table 2 = multiple records for 1 person)

View 2 Replies View Related

General :: Create A Form For Data Entry

Apr 22, 2014

I am trying to create a form for data entry. I would like the Total Balance in the last record to become Total Cost in the new record. However, if the total balance in the previous record is =<0 it prompts the user to enter a new total cost else use the last Total Balance. The form in question is FrmSubClients in the attached file.

View 4 Replies View Related

General :: Update Form With Data From Search Box

Oct 7, 2013

I would like to make a search box and update my form with the person's data from the search box.

View 5 Replies View Related

General :: Open Form And Auto Enter Data

Jun 22, 2014

So, I've got a frmCustomer and want to link the form to frmNewWorkOrder using a button.

More precisely when I choose/scroll to a customer and click the button "New work order" to autofill data from selected client from frmCustomerto frmNewWorkOrder (First and Last name, telephone number and client ID).

View 2 Replies View Related

General :: Adding Photos To Data Sheet From Within The Form

Oct 17, 2012

I have created a DB to store my students records, eg: Student Number, English Name, Chinese Name, Birthdate, Class Number, Age, and exam scores, I also have a photo frame to display the students photo.

In the data sheet I have an ole object field where I add the photos, the thing is it means I need to manually add this to the data sheet, whereas I can add all the other details directly from the form "Add New Record" and also search, delete or edit all from the form.

I have searched and searched but I cannot find any info that accurately explains how I may add the photos to the c where I have placed a button "Add Photo". I assume I need to create a macro and assign it to the button (on click) then this would need to open a search file location box where I can find the photo and select it to be added to the file.

The point is I wish to be able to do all the adding, deleting and editing from within the form and not have to enter into the data sheet at all.

I am using Office 2010

View 6 Replies View Related

General :: Continuous Form - Data Entry With Compulsion

Apr 10, 2014

I have to design a table i know its piece of cake.

Here i want user to continous form which wil be once in a month

needed is

EUR USD From To

User will enter the line with values and the period with valid dates.

Since its a continuous form i need user to fill all the details compulsory, as user cannot close the form without it.

View 2 Replies View Related

General :: Data Collection Emails Based On A Form?

Nov 21, 2012

I am trying to send out data collection emails to fill in my records but it will only let me select fields from single access tables, I want to be able to get them to fill out all the fields as entered in my forms, which contain sub-forms and therefore links to multiple tables.

View 1 Replies View Related

General :: How To Use IsNumeric Function

Jul 30, 2012

I want to make my Courseid field visible in my form based on whats entered in my StudentID Field.I've used the following code but i'm getting an "Else Without If" error:

Code:

Private Sub Form_AfterUpdate()
If Me.studentID = "Pending" Or "Rejected" Or "pending" Or "rejected" Then Me.Courseid.Visible = False
Else: Me.Courseid.Visible = True
End If
End Sub

If the studentID is a number then i want the course to become visible but i don't know how to use the isNumeric function this way.

View 13 Replies View Related

General :: Run A Function On Exit

Jun 13, 2013

I want to run a function when my application closes. But it must run in all cases, so running it on the last form, or in a hidden form, is not good enough. Even if I'm in design mode with no forms loaded, I want it to run.

For background info - my app is locked down tight against clients poking around. I have got a way for me as developer to get into the "back door", and what I'm trying to do is make sure when I'm finished doing my stuff that the app is locked again without me having to remember to do it.

View 8 Replies View Related

General :: Add Button To QAT To Run Sub / Function

Dec 4, 2012

I'm trying to add a couple of buttons to the QAT to run public sub's saved in modules within the DB but for some reason they are not showing when I try to customise the toolbar?The sub's are fairly straightforward (they just open forms) and are saved in a module within the project :

Code:

Option Compare Database
Option Explicit
Public Sub NewEntry()
DoCmd.OpenForm "DataEntry"
End Sub

[code]....

But when i try to add them to the QAT, they are not visible?

View 1 Replies View Related

General :: Data Entry Form - DLookup And Storing To Table

May 8, 2015

I have a simple data entry form based on a table. However I have a few fields that I do a lookup in a field on the form from a query, and yes I know I should not have a lookup in the control source however, this is the way that I will be doing it on this occasion.

=DLookUp("[Salary]","[Salary Query]")

How I get the value from this unbound field to enter into the actual field in the table. Do I bring the actual field into the form and hide, and do some sort of after update, as I have tried and it does not work.

I have called the unbound field with lookup "Salary Level Base" and the actual field in the table is "Salary Base".

View 5 Replies View Related

General :: How To Add Combo Box Field To Data Sheet View In Form

Dec 29, 2014

I created a new field as a text box, converted it to Combo box, then the Values are pulled from a query and all that works fine.

I have a form that opens and displays these Fields in a Data Sheet view and the new Combo box doesn't drop down and is flagged as a text box in the property bar but no way to change it??

I need the drop down like the other Category field I have, that works but this one doesn't.

See screen shot.

You can see in the Category field, there is a Drop down, but in Category II there is not, even though this is a drop down field. - BUT in this data sheet view it doesn't show it as a drop down.

[URL] ......

View 5 Replies View Related

General :: Transfer Data On Textboxes From A Form To Report For Printing

Feb 6, 2013

I've written an application in VB.Net and now I need to transfer the data on textboxes on a form to a report for printing. Only the data on the form is what I want to preview and print.

View 1 Replies View Related

General :: Creating A Form For Data Entry Into Main Table

Oct 21, 2014

I am creating a form for data entry into my main table. It shows all the fields including a name, date, id number etc.

I am trying to put a subform on the form containing a query. The query has two filter parameters fed from two unbound boxes on the main form (date and name). Their purpose is to filter records on the query to just show those for one person on one day. It also calculates a duration based on a start and end time. The query results are ok.

I can't get the query to display properly in the subform.

Subform Properties/data/source object is set to the query name. I'm told i have to link the master fields and child fields but when I try I get the error 'can't build a link between unbound forms'. I thought all that was necessary to bind forms was for there to be a common field between the form and query? Both contain fields from the main table including date, name, start time and end time etc.

View 4 Replies View Related

General :: Send Email Attachment Using Form Data Using Automation

Jun 20, 2013

I am currently using SendObj method to send an Outlook email and selected report as an attachment using the current form's data. This is triggered by a button click.

This is working well apart from having to use 'ClickYes' to outwit the Outlook 2012 security system.

However I now need to selectively send an extra pdf file with some of the emails based on a Yes/No field on the form. This is a fixed file on my local C drive.

I think I have to use automation to do that but I can't find a method of specifying the report I currently use in the SendObj method in the .Add.Attachment line.

Do I need to run the report and then save it so that I can specify the path and name in the .Add.attachment line followed by code which will delete the file? or is there a means of combining the code I currently use in SendObj to create the pdf object with automation option?

I have working code for both attachments at present but they send separate emails and I would prefer to combine them if possible.

View 3 Replies View Related

General :: Loop Function With Variable

Jun 4, 2015

I want to make a loop like this:

Dim var1 As Variant, var2 As Variant, var3 As Variant, var4 As Variant
DIm var5 As Variant, var6 As Variant, var7 As Variant, var8 As Variant
Dim var9 As Variant, var10 As Variant
Dim i1 As Long
i1 = 1
Do Until i1 > 10
var & i1 ??? = "0" & i1 & "." & txt1 & "." & txt2
i1 = i1 + 1
Loop

How to make concatenate var + i1 to make loop function?

View 10 Replies View Related

General :: Replicating Excel Function

Oct 10, 2014

Is it possible to compare rows, ie in excel I could do =A1=A2 to compare certain fields then if they are different/the same highlight.Is there a way of doing this in access?

View 1 Replies View Related

General :: Search Operation Function

Oct 5, 2012

The following search operation have to search some operation in the database, but there is a bug and I don't know why..

View 4 Replies View Related

General :: Undefined Function In Expression

Oct 28, 2014

I now try to rework on an old project but when I try to run some queries I get an error message: Undefined function 'Date' in expression . The same happen for the Format function.Both are built in Access functions

View 5 Replies View Related







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