General :: If Then Tied To A Button

Mar 20, 2014

I have a field called PHLevel. And I want to click a button and based on the results in the PHLevel field open 1 of 3 forms (with just words on it).

So basically I want something like this

If PHLevel is < 7.2 Then
DoCmd.OpenForm (PHtoLow)

ElseIf PHLevel is >7.8 Then
DoCmd.OpenForm (PHtoHigh)

Elseif PHLevel is between 7.2 and 7.8 Then
DoCmd.OpenForm (HappyPH)

Is this possible if so what would I need to do.

View Replies


ADVERTISEMENT

Subform Records Not Tied To Main Form

Dec 19, 2006

OK.... This is a DB I've been playing with a while... Got a few things fixed and working.... But of course more problems came up. This is a DB for tracking time spent on a project. This was all it was at first... Then I decided to add invoicing and got into trouble :) I have one main problem now and can't decide the best way to fix it.... Other then starting again and redesigning the DB.
I attached a copy... Easier to see the problem that way. From the main menu, click on "Open Client Billing"......From there, select a record on the subform and click "View Unbilled Time" From this form you will check a box to "Export" that time to create the invoice. And here is the problem. For example, if you click one out of two records to export it shows your record and creates the invoice. BUT... then if you close out and open it again to add the other record creating another invoice the previous record is ALSO in the new invoice!
So.... The records in the subform are not getting tied to the invoice number. Anyone want to make some suggestions on how the best way to correct my problem would be?

Thanks

View 1 Replies View Related

Queries :: Month To Date When Tied To A Criteria

Feb 5, 2014

How do you calculate or find Month To Date in a query as it relates to a hand keyed criteria.

For example I have a field called Operating Day and right now my criteria in my query is Between DateSerial(Year(Date()),Month(Date()),1) And Date(). Works perfectly. I'm using this data in a sub report.

But now my requirements have changed and its possible that I may need to report on something from January (or December and so forth). Well this criteria will show data from February. But the Month To Date data should show totals for the Month I'm reporting on.

Is this even possible?

View 4 Replies View Related

Forms :: Combo Box Tied To Any Control - Adding Third Entry?

Jul 17, 2013

I have a combo box that is not tied to any control but uses a value list as the row source in the data tab. My question is... it currently holds two names but I am wanting to add a third but when I do the third name does not appear like the first two in the form view. The first two show:

Last Name, First Name, employee #

And the third shows
Last Name, First Name

employee #

And on the third entry... the first name shows where the employee # should be

View 6 Replies View Related

How To Create Incrementing Text Field Tied To Multiple Tables

Aug 28, 2015

This is a errand database where each client can have several errands and some errands are related to each one and other.

Since each client can have several errands and and each errand is related to each one and other, then the client. I thought i need key which can work as a ClientErrandID, so i can tie the errands together. My idee is to use the ClientErrandID as an text auto incrementing field with a string like: (Errand-A-xxxx).

Lest say the range would be from (Errand-A-0000 to Errand-A-9999) And when the string hits "9999" at the end the "A" will switch to a "B" and the number counter would start over from "0000"

How should the table relationship look like?When a user is adding a new errand to a client, how should the function work?

Should all the associated errands be created in the background and granted the same Errand_ID when the main errand is created?Can i create a incrementing text field with vba & queries?

How would the code structure look like?Is there any examples on a incrementing text field with code available?

View 4 Replies View Related

General :: Add New Record - Button

Jun 4, 2015

My Add New Record button doesn't work....The backstory is a little complicated but essentially this was an Access 95 database that was upgraded through office 2003 to Office 2007 a few years ago (.accdb converted). The database became corrupted post Office 2010 installations a few weeks ago but today I have loaded a restored database onto an XP Machine with Office 2007 and the same issue occurs (ruling out Office 2010 as the cause).

I have an Add new record button on the form, it doesn't work with the code:

Code:

DoCmd.GoToRecord , , acNewRec

This always brings up the message: "You can't go to the specified record.".I have tried adding a new button to add a record via the wizard, I receive the same results.I have tested adding a record via the table, that works fine.

View 4 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 :: Button That Is Using A Theme

Jul 16, 2013

I have a button that is using a theme. The words do not center.

View 3 Replies View Related

General :: Put A Custom Button On QAT

Mar 19, 2015

I would like to create a command button that saves a report as a PDF. Currently I am using the built in "PDF or XPS" button but it always opens Adobe reader at the end and also a dialog with the option to save export steps. I want nothing other than a simple save dialog like I can do with a VBA command, but is it even possible to add a custom command to the quick access toolbar?

I know you can add custom commands to the ribbon but the user of this database keeps the ribbon minimized due to it eating up too much of his screen space. The QAT is always visible.

View 3 Replies View Related

General :: Add Textbox On Form With Button?

Oct 22, 2014

I have a form which adds in details of components

Sometimes I will need to add a number of components

What I would like to do is add a new line of the textboxes below the orginal when a button is pressed.

In my head I see it working in a similar visual sense to adding multiple attachments

View 1 Replies View Related

General :: Button To Add New Record To Another Table

Jan 19, 2015

I have a form wich users input information into and it goes in one table. Several buttons on my form send a report from that table to people.

What I need to to is that every time one of these buttons are pressed and a report is sent, a timestamp and wich button was pressed needs to be recorded in another table in the same database.

This is because I need to record to whom each report was sent and when.

View 4 Replies View Related

General :: Button To Copy Value From One Field To Another

Aug 17, 2015

I've got to copy the value of field A so it appears in field B. Field B may be changed, but field A cannot be changed. What's the best code to put into my button to copy the value of field A into field B.

View 3 Replies View Related

General :: Creating A Button Used To Sent Email

Jul 4, 2012

I'm trying to create a button who is able to send a email with an attachment.The attachment will be all the time the same file.The email address to sent to is one of the field of the database.I need a copy sent in my email address as well.

View 9 Replies View Related

General :: Pressing Enter Instead Of Button

Jul 25, 2013

i have a password logon form, after the user enters his password he then has to click on the button to validate and move to the next form.i have been asked to set this so that the user only has to hit enter on the keyboard to do this.

View 5 Replies View Related

General :: Variable Button Label

Oct 28, 2014

I have a printed form that pulls some of its data from a table.What i need is that printed form to have a variable that two area in the form can change based on who is printing the form.I have a table that has all the users data in it. the current form pulls that information from the label and places it into the for. easy enough so far right.

for example. But i need this printed form to be able to be dynamic. So for instance Tom inst sitting that the computer wanting to print the form and so on for four different users who will print the form.So the button that allows the print either needs a way to have a selection or i need four different button. So the second part of this Mark Twain quits his job and Johnny takes his place. easy enough to change the data in the table that my form is pulling the data from but the button label needs to change to that the button.

View 7 Replies View Related

General :: Do Not See Make ACCDE Button

Mar 1, 2013

I do not see the Make ACCDE button. I'm using Access 2010 32 bit. Have an ACCDB FE file which I'm trying to create the ACCDE. I've compiled and fixed the VB errors. I've review trusted sources and insured the folders are trusted. For whatever reason, the button is not showing.

View 2 Replies View Related

General :: Using Command Button To Save New Record

Dec 7, 2012

I have have a form with 4 subforms in it, one of the subforms is based on a filtered query . For a reason I can not work out I cannot get it to requery when I add a new record.

To add a new record I select from a combo box and use a command button to save the record

I have tried using this in the buttons on click event

Code:
Forms.trialcatalogueF!TrialCompetitorsSF!competitorsSF.Form.Requery

with no result, however it does kinda work in the combo's after update event, just not until I select another value.

View 2 Replies View Related

General :: Create Time Clock Button?

Aug 20, 2012

I want to create a toggle button (On/Off), that can show time clock on button. Click to start time, click again to stop time.

View 4 Replies View Related

General :: Creating Search Button On Form?

Jul 22, 2013

putting a search button on a form on my database.

On the navigation buttons at the base of the form there is a search facility where I can type a record id but I would like to get rid of that and search records either by turning the ID field into a searchable box or by adding a button where I can press it and get a search box up.

View 1 Replies View Related

General :: Coding A Button Special Function

Apr 23, 2015

I have created inventory databases for both my job and personal use. I do not understand coding. I either need a good hand-holding with simple, detailed instructions or I need to hire a code person.

A button in my form that can be coded to ... When clicked ...

___ open a browse window of hard drives,
___ allow user to choose any single image for selection,
___ copy & paste selected image's location to a table field.

NOTE: Table field will be used to connect to image place holder on form with control source to make the image seen.

View 8 Replies View Related

General :: Button Attaching Documents To Forms

Jul 18, 2012

I'm trying to use this API in my database to be able to attach documents to my forms. [URL] .....

Do I have to put this into its own Module? I'm not familiar with how the code is defining Types and declaring Global variables.

View 5 Replies View Related

General :: Delete Button - Forms And Tables

Sep 12, 2012

I have a form, with tab control which includes fields from two tables. When I delete a record on a form it deletes fine.When I go into the tables the record is still there in the one side of the relationship but has been deleted in the table of the many side.

I've read that a simple delete button on a form will only delete records in the many side of a relationship from a table.How do I get a delete button that deletes the record from both the one and many tables.

View 10 Replies View Related

General :: Create X Number Of Records With A Button

Apr 8, 2015

I know this has probably been gone over, but I'm just looking for a super-simple way to put a button on my form that will create a number of records equal to the number of days in the month listed in a field. For instance, if MyField is "4/1/2015", I'd like the system to create one record for each date between 4/1/15 and 4/30/15.

I have scoured the forums, and I find many threads on creating multiple records, but none of them deal with the same type of thing I need. I have a field, called MyField, and I have a table called MyTable with a column called MyDate. I want to enter a date into MyField, then click a button, and the button will run code/macro/whatever that will create multiple rows in MyTable, one for each date in Month([MyField])

View 8 Replies View Related

General :: Opening Excel With A Command Button?

Jul 12, 2013

I am trying to open MX Excel using a command button. I have tried using a hyperlink a various codes that i have found online with no luck. The Excel file is being used by the Access as it bring data from the spreadsheet a displays it within a subform. (I think this is where the problem occurs) The subform displaying some data from Excel is working fine but when i click my hyperlinked button i am met with errors and the file will not open.

View 6 Replies View Related

General :: Command Button Enable Or Disable

Jul 27, 2012

I have a form. and it has three buttons. Such as Submit, Reject, Under Observation.

I want :
1) If i click SUBMIT button it will be disable and other two buttons REJECT and UNDER OBSERVATION will be enable
2) If i click REJECT button it will be disable and other two buttons SUBMIT and UNDER OBSERVATION will be enable
3) If i click UNDER OBSERVATION button it will be disable and other two buttons SUBMIT and REJECT will be enable

View 1 Replies View Related

General :: Use VBA To Click A Button That Fires A Macro?

Sep 4, 2012

enable me to run some code before a button is clicked I want to be able to click a button via VBA code.Basically I used the auto button wizard to make an add record button.To ensure a shed loads of if checks and queries on the entered form data run I wanted to make this button invisible, then make a new button running code not embedded macros to run my checking module then click.

View 9 Replies View Related







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