Forms :: Day Of Month Not Required To Be Visible

Mar 3, 2014

I have a table that records a list of dates using the first of the month in short date format (01/01/2011) and I have the following query

Code:

SELECT Format([dateworked],"mmm yyyy") AS Monthyear, Table_dateworked.dateworked
FROM Table_dateworked;

This query is the source for a combo box so it stores the actual date but the formatted date is visible.An additional complication (if it has to be) is that I have two combo boxes and I want to make sure the finish date is later than the start date, so I have a similar query which only returns later dates than the start date.

What I would like to do instead is to remove the combo box and to get the user to type in the month and the year in the "MMM YYYY" format, default the day to the first of the month and make it invisible.How difficult would this be? Would it be easier to enter the date in short format and change the format using the after update event?

View Replies


ADVERTISEMENT

Only The Month Required From The Date Field

Nov 8, 2005

Hello everyone

I am wanting to pull out only the month part from a date field, 11/10/2005.

In the query I have made an expression to pull the month, eg 10 for October.

I need to convert this number of the month to the Title of the Month.

I made a combo box on the report based on the Expression and in the row source put

1,"January", 2,"February",3, "March", 4,"Apri", 5,"May", 6,"June", 7,"July", 8,"August", 9, "September", 10, "October", 11, "November", 12, "December"

Unfortunately it still comes out with the number of the month.

Can anyone tell me please where I am going wrong.

Thank You in advance.

View 2 Replies View Related

Forms :: Visible / Non-visible Combobox - Column Attribute?

Oct 17, 2013

I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:

Code:
Private Sub Form_Current()
If Me.TypeOfBusiness = "Industry" Then
Me.IndustryClassification.Visible = True
Else
Me.IndustryClassification.Visible = False

[Code] .....

It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. What code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute.

View 14 Replies View Related

Forms :: Fields Are Required To Be Filled Out Even Though Not Set As Required

Nov 3, 2014

I have made a form based on related tables. it requires me to fill out every field, which I don't want. I didn't make them required. Why does it do that?

View 3 Replies View Related

Forms :: Calendar Scrolling Month By Month

Aug 9, 2013

Using Access 2010..I have form with a date on it. For this control I have show date picker set to "For dates" and lo and behold I get calendar! I can scroll through this calendar month by month. Great if I just want to go back or forward a month or three. What I'd like to be able to do is scroll through the calendar year by year. Can I do this with the method I'm using at the moment? If not is there a way round it that isn't over complicated?

View 6 Replies View Related

Modules & VBA :: Make Controls Visible Or Not Visible?

Mar 24, 2015

I have a Main Form with a Sub-Form, the sub-form is base off a query. on the sub-form i have 8 controls, one of them is "Status' and "Process" and "Review" My Main Form have a Refresh command that refreshes the data in the sub-form.

What i am trying to do is make the "Process" Control only visible is "Status" is a certain status and "Review" visible if "Status" is something else. what i have done works correctly On Open. I run into and issue on the refresh command. I get Run-time error '2165' "You can't hide a control that has the focus"

Code:
If Forms!Main_Form.[Name subform]!Status = "Ready" Then
Forms!Main_Form.[Name subform]!Process.Visible = True
Forms!Main_Form.[Name subform]!Review.Visible = False
ElseIf Forms!Main_Form.[Name subform]!Status = "Reviewing" Then
Forms!Main_Form.[Name subform]!Review.Visible = True
Forms!Main_Form.[Name subform]!Process.Visible = False
End If

I have done similar with a main form and making sub-form visible or not based on a control on a main form and that has worked perfectly. I am not sure how the control is getting focus and cause the error.

View 4 Replies View Related

Visible.Enabled Remaining Visible!

Sep 12, 2004

I have a form with four subforms set up in a tabs on the form. In the subforms I have a copuple of command buttons which enable/make visible fields when they are clicked (see previous posts but for eg) - if a height and a weight are added in two separate boxes a calculation is done and then a command button pressed to make visible the (label) which shows the mass index the patient falls into. My problem is that the label is then retained so if I click out of the form and re-enter with a new patient then the height and weight boxes are clear but the label from the previous patient remains.

I tried to put the code
Private Sub Form_Load()
If PtWeight = Null And PtHeight = Null And Text60 = Null Then
Label106.Visible = False
Label101.Visible = False
Label177.Visible = False
Label122.Visible = False
Label123.Visible = False
End If
End Sub
in both the open and on load event of the main form (not the subform) but it doesn't help. Any ideas?

(When should code be put on the main form and when on the subform?)

View 2 Replies View Related

Passwords Visible On Web Forms?

Oct 11, 2013

I have a form that includes a text box for a password. The passord works fine on a local table, but when I upload the form to the web the password is visible. How can I format the text box so that the text box shows "*******" on the web form?

View 1 Replies View Related

Some Forms, Tables, Etc. No Longer Visible

Mar 1, 2006

Several years ago, my colleague and I built some databases (using Access 97, if it matters). We are both responsible for the maintenance of them.

Recently, the hard drive in my PC crashed, and the IT group replaced it. Now, when I open one of the databases, I cannot see all of the Forms, Tables, etc. Thinking the database had been corrupted, I asked my colleague to open it on his machine. Everything was there, and can be viewed from his PC.

All was well until my hard drive was replaced. Has anyone seen this before? Any help will be greatly appreciated.

View 1 Replies View Related

Forms :: Are 2 Forms Required For New Entries And Edits

Mar 23, 2015

I have a form for inputting Crisp Brands. On the form is a Txt_box for entering the crisp brand an unbound txt box for renering the text box to ensure spelling is correct and a lst_box listing all existing crisp brands in the sytem.

First question is:

1) When i open the form i only want to be able to add new entries and not be able to edit old entries. However i would like some people to have the ability to edit existing ones. Is it best to create two forms one for new entries adn one for editing or is it best to add a command button on form for editing.

2) how do i achieve new entries only?

View 2 Replies View Related

Forms :: Checkbox Be Visible Only If A Textbox Has Text In It

Jun 12, 2014

I would like to have a checkbox be visible only if a textbox (Text246) has text in it.

Code:

Private Sub Text246_AfterUpdate()
Me.Check275.Visible = Text246
End Sub

View 2 Replies View Related

Forms :: Make Visible When Field Is Not Empty

Oct 6, 2013

I've got a memo field on a form where the name is TextEXTRA

The Control Source for TextEXTRA is EXTRA.

I've got a box called BoxSHOW (Visible = No)

As I browse through records or find records, I want the box to become visible when there is something in the EXTRA field and become invisible when the EXTRA field is empty. This is what I've tried .....

Private Sub Form_Current()
If EXTRA Is Not Null Then
BoxSHOW.Visible = True
End If
End Sub

I tried many variations on the first line such as ...

Me.EXTRA "EXTRA" TextEXTRA

but I always get errors.

View 5 Replies View Related

Forms :: Required Field On Subform

May 30, 2014

Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)

' This procedure checks to see if the data on the form has
' changed. If the data has changed, the procedure prompts the
' user to continue with the save operation or to cancel it. Then
' the action that triggered the BeforeUpdate event is completed.

Dim Ctl As Control

On Error GoTo Err_BeforeUpdate

[code]....

THis code avoids a form being closed if a required field (with tag "*") is not filled. How can I expand it to fields on a subform?Another "issue", how can I personalize the error messages :

1) Can't save record at this time ... (required fields in my table)
2) Multicolumn index causes an error message "Ca't save because of duplicate value in primary key, index ...

View 3 Replies View Related

Forms :: Required Fields In Subforms

Jul 28, 2014

I have a form and subform.The form and subform both access tables that have "required" fields.If I try to tab to the sub form without filling in the required field then I get an error message generated by access (this is what I want). If I try and exit the form without the required field I get an error message as well.

Now it's a different story with the sub form. The sub form contains 1 to many rows. In each row there is a required field. I don't get any error message for not filling in that field. I Know I can 'capture' this in the code but I want access to do it.

View 2 Replies View Related

Forms :: Visible Radio Button Based On Field

Jul 14, 2015

I can do this if there is one record: ie

Private Sub Form_Open(Cancel As Integer)
If Me.field1 ="DontShow" Then
Me.cmd_splt.Visible = True
Else
Me.cmd_splt.Visible = False
End If
End Sub

This creates a button that masks my radio button i.e. hides it. However this only works on single forms.

I need it to be different for each record in a continuous form.

I am putting the code in the "OnOpen" property. Maybe that's my problem?

I've also tried conditional formatting but it wont over-ride a transparent text box.

View 5 Replies View Related

Forms :: How To Make Combo Box Visible When Click On Label

Sep 28, 2014

i have a label and a combobox (the combobox is invisibile). in a form.

how do i make the combobox visibile when i click on the label?

View 2 Replies View Related

Forms :: Subform Visible / Invisible Based On Control

Jun 18, 2015

I need to have a subform that shows up smack dab in the middle of my main screen when visible - which is what I want - but only based on a specific value of a control on the main form. Specifically, if a control's value is "See Spreadsheet", I want the subform visible front and center as it contains the link to the server location for that specific record. If the control's value is not "See Spreadsheet", I want the form to be invisible.

My code:

If Me.BudgetsFacultyAccountNumber = "SEE SPREADSHEET" Then
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = True
Me.BudgetsFacultyServerLocation.Visible = True
Else:
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = False
Me.BudgetsFacultyServerLocation.Visible = False
End If

The red lines result in an MS VBA error: "Compile error: Method or data member not found."

I've tried referencing that subform a hundred different ways, but I can't get it to work.

View 5 Replies View Related

Access, Required Fields, Forms & ODBC

Jan 28, 2008

I am working on an Access 2002 database where one of the tables has five required fields making up the key.

There is a form that is linked to this table which is used for adding new records.

There is a close button on this form that has the following code in it's OnClose event:

"DoCmd.close"

When the form is opened, no data entered and then the close button is clicked - nothing happens.

It used to work fine, until I recently upsized the database into a SQL Server database and now it's all gone horribly wrong.

If I close the form manually by clicking on the cross, I get this
error:

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value
NULL into column 'Product', table
'LeasebookSQL.leasebook_user.leases'; column does not allow nulls. INSERT fails. (#515) [Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. (#3621)

Can anyone please tell me how I can get the form to close without trying to save the record, especially when no changes have been made to the data on the form?


Thanks,


Simon

View 7 Replies View Related

Forms :: Required Field In Form And Not Table

Apr 29, 2014

Is there any way to require data into a field at the FORM level and not in the table?

View 14 Replies View Related

Forms :: Check If All Required Fields Have Been Filled

Jun 27, 2015

I tried to check if all required fields have been filled before saving the record using the following code.

Private Sub txtReportNo_BeforeUpdate(Cancel As Integer)
If IsNull(Me.cboMainCat) Then
Cancel = True
MsgBox ("Please enter Data for Main Cat")
Me.cboMainCat.SetFocus
End If
Repeat above code for all required controls here.
End Sub

It did not work with following error code.

Run-time error 2108

You must save the field before you execute the GoToControl action, the GoToControl method, or the SetFocus method.

The error message contradicts my original intention that prevents from saving without all required fields have been filled. Is there any way to get rid of this error message?

In addition, under the value of certain field, I need to check additional fields under that scenario. Is any additional code required to add in for that purpose?

View 10 Replies View Related

Forms :: How To Make A Text Box Entry Required

Nov 27, 2014

I know how to make a text box entry "required" such that one cannot exit a record until a value is entered but cannot figure out how to make it required only if another field on the form has an entry. None of the form events seem to support that when focus moves to another record as far as I can tell. What I want to do is display an error message if the condition is not met on exiting a record but to also remain on (or go back to) that record so the required text box entry can then be made.

View 4 Replies View Related

Forms :: Form Field Required After Update?

May 13, 2013

The data base I'm creating deals with Account numbers, I have a check box asking the end user what type of account they have Cell or no Cell, If they check yes to cell two other check boxes come up Primary/Backup.

Private Sub Cell_Account_Click()
If Me.Cell_Account = True Then
Me.Primary.Visible = True
Me.Backup.Visible = True
Else
Me.Primary.Visible = False
Me.Backup.Visible = False
Me.Primary = Null
Me.Backup = Null
End If
End Sub

I would like to make it so that when clicking the Cell Account that it's required to select one or the other Primary/Backup?

View 14 Replies View Related

Forms :: Can't Get Subform To Be A Required Field To Be Filled In

Jul 16, 2015

I haven't programmed using Access in about 10 years and seem to have lost all knowledge of it.I'm struggling to make a really simple application. I need to keep track of which serial number is attached to which order.All I want is for me to be able to scan a barcode (or manually type the numbers) into a 'packschein' (packing list) and then to scan all the barcodes of the products' serial numbers relating to this packing list. Then preferably simply press the enter button or even better scan a barcode which launches the code to save the new entry.

So a packing list can have 1 or more serial numbers.However, the way I've set it up, for some reason it requires a packschein number (good), but then does not require a serial number. I have this feeling I messed up with the way the tables are meant to be linking to one another.

View 1 Replies View Related

Forms :: Visible / Invisible Control Based On User Access?

Dec 2, 2014

My company has a new database that we will use to track PTO (paid time off/vacation), including the submission/approval process. Not everyone should have access to the approval dashboard as that should be restricted to only managers. Everyone will have the same basic form so that they can see their PTO history, hours remaining to be used, etc.

What I want to do is have a button on the form that is visible only if the person is a manager. The button will open the PTO approval form. How can I make a button visible/invisible based on user access levels?

View 11 Replies View Related

Forms :: Select Via Combobox - Make Numerous Controls Visible

Sep 18, 2013

I have a form where i select via a combo box if a product has been inspected, if it has, additional controls are then made visible.

If Me.Inspection_Completed = "Yes" Then
Me.Date_Inspection_Comp.Visible = True
Me.Date_Inspection_Comp = Me.Dateinsp
Me.Inspector.Visible = True
Me.Qty_Inspected.Visible = True
Me.OK.Visible = True

[Code] ....

I tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.

View 4 Replies View Related

Forms :: Required Field Suddenly Needed During Filter

Feb 25, 2015

I have a form that I have opening in Filter by Form mode. It WAS working flawlessly, at least it was opening in that mode. It IS still requiring me to click on Toggle Fields once data is entered into controls to filter by, but that's another issue (I wrote a recent comment, but haven't gotten any response). Something different is happening suddenly that wasn't happening before. This form is a copy of a form needed to enter data.

Both forms read from a table which has several required fields. Suddenly, when I open the form to find records in ANY mode it's making me enter something into these required fields, even though I'm not searching/filtering by them. The message comes up "You must enter a value in the [Specific Required Field name here] Field." What did I do to make this start happening? How do I stop it? I DO want something to need to be entered in the required fields when new records are being entered and when things are being changed. However, I don't want it to be required during search processes.

View 12 Replies View Related







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