Tick Box And Text Box Not Working Properly

Aug 7, 2006

I have a 'yes' check box and a 'no' check box. When the 'yes' check box is ticked, it enables a text box so I can enter a date and disables the 'no' box. Great, how it should work.

However, for some reason, whenever a date is entered into the text box when the 'yes' box is checked, every 'no' box afterwards is greyed/disabled out.

The thing is, it doesn't happen when no data is entered into the text box, when the 'yes' box is checked. So I can have the yes box checked, the no box will grey out as it should, and the text box will be enabled, as it should. But as soon as I enter a date, the above problem happens.

If that's not too confusion, can anyone help?

I've tried attached the database, but apparently it's too big, so i've posted the code underneath.

Cheers

Dan

EDIT: - i've just figured out that this problem is solved when I close the form and re-open it. But obviously I don't want to keep doing this every time I have to enter a date in a record.

Code:Private Sub chkSuccessful_AfterUpdate()If chkSuccessful = True ThentxtDateAppointed.Enabled = TrueEnd IfIf chkSuccessful = True ThenchkSuccessfulNo.Enabled = FalseEnd IfIf chkSuccessful = False ThenchkSuccessfulNo.Enabled = TruetxtDateAppointed = FalseEnd IfEnd SubPrivate Sub chkSuccessful_Enter()If chkSuccessful = True ThentxtDateAppointed.Enabled = TrueEnd IfIf chkSuccessful = True ThenchkSuccessfulNo.Enabled = FalseEnd IfIf chkSuccessful = False ThenchkSuccessfulNo.Enabled = TruetxtDateAppointed = FalseEnd IfEnd SubPrivate Sub chkSuccessfulNo_AfterUpdate()If chkSuccessfulNo = True ThentxtDateAppointed.Enabled = FalseEnd IfIf chkSuccessfulNo = True ThenchkSuccessful.Enabled = FalseEnd IfIf chkSuccessfulNo = False ThenchkSuccessful.Enabled = TrueEnd IfEnd SubPrivate Sub chkSuccessfulNo_Enter()If chkSuccessfulNo = True ThentxtDateAppointed.Enabled = FalseEnd IfIf chkSuccessfulNo = True ThenchkSuccessful.Enabled = FalseEnd IfIf chkSuccessfulNo = False ThenchkSuccessful.Enabled = TrueEnd IfEnd Sub

View Replies


ADVERTISEMENT

DSum Not Working Properly

Dec 8, 2006

I can't figure out what I have wrong in my code. I've searched all over the forums and the help files in Access. I'm sure it's something simple. Could someone please take a look?

=DSum([DefectQty],"d_sub1_DefectReport","CodeID= "" & [tblDefectCodes].[CodeID] & "" AND ""[InspectDate] >= #" & [Forms]![frmDefectDetailReport]![txtStartDate] & "#" And "[InspectDate] <= #" & [Forms]![frmDefectDetailReport]![txtEndDate] & "#")


I'm trying to get a sum of all defect quantities between a date range from a user form. Rather than summing all the defect quantities for a defect code, it's summing up the total quantites for each quantity. I'm sure that doesn't make sense so here's an example:

InspectDate CodeID DefectQty DSum Should Be
6/1/06 100 1 3 5
6/2/06 100 2 4 5
6/3/06 105 1 3 1
6/4/06 103 1 3 1
6/5/06 100 2 4 5


The domain is a query because the dates come from a different table than the defect quantities, so the query is pulling all the relevant data to be summed.

View 6 Replies View Related

Count Not Working Properly

Nov 20, 2007

Dear Access Mates:

Code:

=NZ(DCount("[DEGREE]","JUNE2005ALL","[DEGREE]='MSED' AND 'MS' AND [DEPARTMENT]='EDUCATION' "),0)

This statement is in an unbound text box but it does not return the proper total. It is counting only the "MSED's" and not "MS's".

This information is from a table.

Is the above syntax correct?

Many thanks to all.

Regards,

Dee

View 3 Replies View Related

Code Not Working Properly..urgent Pls.

Apr 17, 2006

Hi All,

I have Header form and subform subform in it with following fields

Subform fields are :

1. MQE_No : (Text field as it will be like MG-120, MG230), Duplicate OK)
2. RPO_No : (Number field – Double, Duplicate OK ) The are project no.
3. ForemanNo (Number field – Long Int – Duplicate OK)

Header form fields are ;

1.ForemanNo – Long Int – No Duplicate
2.Other fields…

The subform field have ForemanNo One-To-many relationship with Header form.

Following project MG-411 need to enter (assign) to foreman no. 641

Actual data to store in subform

MG-411 (MQE_NO)
5421654 (RPO_NO)
641 (FOREMANNO)

I started to enter data into subform selecting the ForemanNo at header so records to enter in specific foremans account. Everything is fine here.

What I need is:

I would like to select / add another Foreman into the header and start entering same above data for another Foreman. Bcz sometimes we need to do like this in case previous Foreman may go on to a week vacation. We can not stop project for a week. So need to assign project to other foreman.

When selected the Project (MG-411) thru a combo to assign it with other foreman, it should give a short msg to user that this project has already been assigned to “XYZ” forman. Need to assign again “ (Y/N box )

If Y then data entered otherwise cancelled.

To achieve this, I did the following but only 50% success. (Used Cmbo CboRPO2 select MQE_NO). Tried to satisfy both condition but no use.

Private Sub CboRPO_AfterUpdate()
If DCount("*", "T_RPO_Footer", "RPO_No = " & RPO_No) > 0 And DCount("*", "T_RPO_Footer", "ENO = " & ENO) Then
MsgBox "RPO ALREADY ASSIGNED TO SOMEONE / FOREMAN", vbOKCancel, "WARNING!!!"
Me.Undo
Exit Sub
Else

Dim Msg, STYLE, TITLE, HELP, CTXT, Response, MYSTRING
If DCount("*", "T_RPO_Footer", "RPO_No = " & RPO_No) > 0 And DCount("*", "T_RPO_Footer", "ENO <> " & ENO) Then
Msg = "RPO ALREADY EXIST WITH OTHERFOREMAN, ASSIGN AGAIN TO ANOTHER ?"
STYLE = vbYesNo + vbInformation + vbDefaultButton2
TITLE = "!! ATTENTION !!"
HELP = "TEST FILE"
CTXT = 1000
Response = MsgBox(Msg, STYLE, TITLE, HELP, CTXT)

If Response = vbYes Then

Me.MQE_NO = Me.CboRPO.Column(0)
Me.RPO_No = Me.CboRPO.Column(1)
Me.WORKSHEET_NO = Me.CboRPO.Column(2)
Me.WORKORDER_NO = Me.CboRPO.Column(3)
Me.WORK_DESC = Me.CboRPO.Column(4)
Me.PL = Me.CboRPO.Column(5)
Me.PipeLineKM = Me.CboRPO.Column(6)
Me.DiaMeter = Me.CboRPO.Column(7)
Me.PipeLength = Me.CboRPO.Column(8)
Me.PipeLineArea = Me.CboRPO.Column(9)
Me.P = Me.CboRPO.Column(10)
Me.RPO_AMOUNT = Me.CboRPO.Column(12)
Me.INV_AMOUNT = Me.CboRPO.Column(13)
Me.Status = "WIP"
Me.StatusID = 2
Me.CboStatus.SetFocus
Else
Me.Undo
Exit Sub
End If

Else
Me.MQE_NO = Me.CboRPO.Column(0)
Me.RPO_No = Me.CboRPO.Column(1)
Me.WORKSHEET_NO = Me.CboRPO.Column(2)
Me.WORKORDER_NO = Me.CboRPO.Column(3)
Me.WORK_DESC = Me.CboRPO.Column(4)
Me.PL = Me.CboRPO.Column(5)
Me.PipeLineKM = Me.CboRPO.Column(6)
Me.DiaMeter = Me.CboRPO.Column(7)
Me.PipeLength = Me.CboRPO.Column(8)
Me.PipeLineArea = Me.CboRPO.Column(9)
Me.P = Me.CboRPO.Column(10)
Me.RPO_AMOUNT = Me.CboRPO.Column(12)
Me.INV_AMOUNT = Me.CboRPO.Column(13)
Me.Status = "WIP"
Me.StatusID = 2
Me.CboStatus.SetFocus
End If
End If
End Sub


I tried with following code also

'Dim cdn As String
'cdn = "[MQE_NO] = '" & Nz(CboRPO, "") & "'"
'cdn = cdn & " And ENO = " & ENO

'If DCount("*", "T_RPO_Footer", cdn) > 0 Then
'MsgBox "THIS RPO ALREADY ASSIGNED TO THIS FOREMAN", vbOKOnly, "WARNING!!!"
'Me.Undo
'Exit Sub
'Else
‘do something
‘End if

Can somebody help it please.

With kind regards,
Ashfaque

View 1 Replies View Related

Import Feature Not Working Properly...

Sep 12, 2005

Hey all, I have a strange problem that I can't seem to find the solution for...

At my work we have a number of computers running W2k with Office 97.
We daily have to import excel spreadsheets into Access.

This is never usually a problem as obviously as soon as you click import the import spreadsheet wizard appears.

But on one particular machine it doesn't.

Basically on this computer Access will import the excel file, but won't bring up the wizard that lets you say what to import, whether the first row contains a header, the data type for each field etc, it just asks you to select what sheet you want, then imports it, no options.

Now the ironic thing is that usually this is not a problem as the file is still imported without any problems, but the other day we had a file that once imported was all messed up, all fields all over the place.

When done again on a different computer there were no problems so I'm assuming that this peculiar way of importing is to blame for messing up the data.

Does anyone know how I can resolve this? I have tried dragging the accwiz.dll over the regsvr32.exe and it says it's registered successfully, and I have checked that it is the correct version number, what am I missing?

It would make more sense if it just didn't import, then you could better understand how to fix it, but it's the fact that it does import, just not in the 'usual' way that bothers me. How can I make it bring up the proper import spreadsheet wizard?

Kind Regards
rd_boon

View 1 Replies View Related

Filter By Form Not Working Properly

Feb 13, 2007

Hi,

I'm working in Access 97 and I've got a form that I want to use to create filters with.

There are a couple of things that I'm not clear about and I'd appreciate any suggestions that you can make:

1. The form seems to remember the last filter, so when I click on the Filter by form button it shows the last filter by default. I've included the following in the click event:
RunCommand (acCmdRemoveFilterSort)
Me.FilterOn = False
RunCommand (acCmdFilterByForm)
Surely either of the first two statements should remove the filter, shouldn't they? and if not then what are they for?

2. I can't get the 'OR' tabs to show at the bottom of the filter by form screen unless I apply the filter once and then click on the filter by form button again. Is there any way of forcing these tabs to appear?

Thanks for any help/advice you can offer.

Regards,
Bernard D

View 2 Replies View Related

Join In Query Not Working Properly?

Jan 15, 2006

I have a query where I'm selecting fields from two tables - Students and Attendance. I have selected option 2 in my Join Properties, i.e "Include ALL records from Students and only those from Attendance where the joined fields are equal". The tables are joined by StudentID. Either I'm misinterpreting what the join is supposed to be doing or it's not working.
I need to see every record in Students regardless of whether or not they have a record in Attendance. I need to calculate absences and tardies. If there's a matching record in Attendance, I subtract the date absent from the total days. If there's no matching record in Attendance, I still need to calculate total days and show it. As it is now, if there's no matching record in Attendance, it doesn't do anything. How can I get it to do what the join says, "Show ALL records in Students as well as those that match in Attendance?

Thanks

View 2 Replies View Related

The Count Function Not Working Properly.

Oct 6, 2005

I am using the “count function” on an MS Access 2003 Form field. The count function seems to be working fine except it is not placing the result into the table field.

Does anybody know what I am doing wrong?

Can someone show me the proper format for using the count function used on a form field, where the result is to be placed in a table field?

Please Help!!!



Seti UNIVERSE
http://www.setiuniverse.com/
All of the SETI (The SEARCH for EXTRA--TERRESTRIAL INTELLIGENCE) disciplines in one place.
(Radio, Optical, Microwave, and Amateur SETI)
Stop by Seti UNIVERSE and find out, what you didn't know about SETI.

View 1 Replies View Related

Show Text Box If Tick Box Is Selected

Aug 5, 2011

I basically need a text box which is for date/time to disapear/appear when i tick or untick a little tick box.

My tick box is called AlarmResponse and my text box is called CallReceived...

View 14 Replies View Related

Forms :: Form Working Properly Alone / But Gives Error When Combined With Other Forms

Jun 5, 2015

I have a form "NewMetalF" that has three combo boxes. The first one is used to choose "Precious Metal" or "Base Metal". The second one shows all the metals based on the first combo box. When I open the form in form view alone the combo boxes work flawlessly. I run the form "NewMetalF" within another form "NewExternalPartF" by clicking a button "AddMetal". When the button is clicked "NewMetalF" opens. The first combo box is selected, and when the second combo box is clicked the error "Enter Paramater Value" "Forms!NewMetalF!cboPreciousOrBase".

View 13 Replies View Related

Why Doesn't RTF Text Display Properly In Report

May 2, 2012

I have a memo field with RTF that shows properly on forms. For example

"<strong>"&"my text: "&"</strong>"&"more text" displays my text: more text

However, on my report it looks like the characters (e.g., "<strong>"&"my text: "&"</strong>"&"more text").

The report control is RTF format. why it doesn't display as I'd like?

View 1 Replies View Related

Working With Text And Dates

Mar 19, 2008

I have a situation where I need to extract the date from a text field to use in a select query. The date in the text field is listed at the beginning of the text field like this.

S12345678 3/21/2008 adittional text beyond here blah, blah...

the first series of numbers can be either 9 or 10 digits long, and then the date is always in this format, the length of the characters change accordingly with the date. So trying to use the Mid function only wont work.

I supposed I need to find a way to get the position of the space character in front of and after the date to use the Mid function for each record.

I need to be able to extract this date to do a DateDiff against another date.

I have been trying to do something like this.

Narr_Date: Format(Mid([si_narr_t],InStr(1,[si_narr_t],Chr(32)),InStr(9,[si_narr_t],Chr(32))),"Short Date")

But I know I am off the mark here. Can someone tell me what I am missing?

View 3 Replies View Related

Reports :: Text Box From Drop Down Not Working

Jan 7, 2014

I have a textbox that has 3 columns in it (Rank, First Name, Last Name)...when the user selects the appropriate choice, it just shows the Rank.

Ex: Lt. John Smith --> just shows Lt.

To get around this I made an unbound text box and have it set to show all three choices when the selection is made in the drop down box. Unfortunately, it isn't working right. This is the code I am using for the text box:

=[OPRID].[column](1) & [OPRID].[column](2) & [OPRID].[column](3)

Is there anything that looks wrong with this code?

What it ends up showing in the text box is: JohnSmith (no rank, no space between the names).

View 3 Replies View Related

General :: Formatting Text To Date Not Working As Expected

Sep 17, 2014

I am trying to get a text string from a table to convert to the proper date format in access 2003.

The text string is formatted as 140930 for Sep 30th, 2014 for example.

I have tried using the formula following formula: Format([PCCSDTA_DCSDIU]![DTEAVL],"mm/dd/yyyy") but this format returns the date 11/06/2285 instead of the desired 09/30/2014.

I am still relatively new to Access.

View 9 Replies View Related

Queries :: IIf Formula With Text Field In Query Not Working?

Apr 23, 2014

I got a table salaries master I want to extract some info out of and calculate some values. The formula below doesn't work, I'm pretty sure it has to do with [pay period] being a text field. Is there no way to make it work?

'Gross monthly Salary: IIf([Salaries Master]![Pay Period] = "weekly";[Salaries Master]![Daily Wage]*5*52/12,IIf([Salaries Master]![Pay Period] = "monthly";[Salaries Master]![Daily Wage]*20))'

View 10 Replies View Related

Tick Box Problem

Feb 13, 2006

Hi.
I've set a up a tick box to choose the option to have an extension on a booking. If it is ticked, then i want it to add an extra Ł5 to the final cost, BUT, it can ONLY be ticked, if the Day of week is a Friday or a Saturday, AND if the time period is an evening.

Is there a way of making it, so that if the day of week is equal to friday or saturday, AND time period is equal to evening, the tick box becomes active, or visable, and if it is any other time period and day of week, it cannot?

Thanks

View 5 Replies View Related

Tick Box Manipulation

Mar 17, 2008

This is probably very simple but still beyond me.

I have a table that stores text in a number of different languages. Each entry has a unique ID number. Each language version of the same text shares the ID number.
I have a column of tick boxes that show where this text is used.
ie
1.0 English_text_record_1 tickcol1=y tickcol2=n tickcol3=y
1.0 French_text_record_1 tickcol1=y tickcol2=n tickcol3=y
1.0 Spanish_text_record_1 tickcol1=y tickcol2=n tickcol3=y
2.0 English_text_record_1 tickcol1=y tickcol2=y tickcol3=y
2.0 French_text_record_1 tickcol1=y tickcol2=y tickcol3=y
2.0 Spanish_text_record_1 tickcol1=y tickcol2=y tickcol3=y

I am trying to set the tick boxes so that, if I tick one in an ID range, all the rest tick on as well. ie if I tick record 1.0 English tick_col_2, then the French and spanish will be ticked as well.
Any suggestions will be greatly appreciated.

Andy

View 1 Replies View Related

Tick Box Code When Value = ###

Dec 6, 2006

hi,

what would the code be if i wanted a tick box called 'paid?' to be true once a field on my form called 'amount outstanding' = Ł0?

thanks

View 10 Replies View Related

Tick Boxes

Apr 23, 2008

I currently have a form which contains a column of tick boxes, when a box is ticked the database automatically enters the date and the name of the person logged on. It all works fine except that if i tick say row 1 then the date/name appears as it should, but at the same time random (or so it seems) boxes have ticks appear, although there is no data added to the names/date fields, just the ticks appearing .
Not sure why !!!

View 13 Replies View Related

Recordset Filter With Tick Box Yes/no

Nov 15, 2005

Hi There

Im Trying To Find A Solution To My Problem About Searching Records Through A Recordset Filter. I Have Performed The Follwing Code To Filter My Records From The Combo Box However In My Database I Have Several Yes/no Fields That I Would Like To Filter Out As Apart Of A Recordset.

Code is

Dim sql As String
sql = "SELECT * FROM [qry Landuse Survey 2005] WHERE [STREET] = '" & Me![Combo255] & "'"
Me.RecordSource = sql


Does Anyone Know How I can use the same principle for Yes/no Field Types?


Comments Much Appreciated!

View 4 Replies View Related

Searching Yes/No Tick Boxes

Jun 21, 2006

Hi everyone

Is it possible to create a query that prompts the user to enter the search criteria (i can do that bit) to search whether a yes/no tick box has been ticked or not. What does the user enter into the criteria box to find this?? I have tried entering null, not null, true, false, yes and no but none of them seem to work. Is this because the criteria you enter is taken as a text string and therefore will not find a tick/no tick??

James
Youngest Data Manager in England ;)

View 1 Replies View Related

Tick Box Doesn't Appear Enabled.

Jun 23, 2005

Have a number of tick boxes on different forms. When the form is opened the tick box appears to be greyed out however it is enabled. Is there any way that these tick boxes can appear enabled???

View 2 Replies View Related

Can You Have Coloured Tick-boxes?

Nov 8, 2006

Hi,

Does anyone know if it's possible to colour a tick-box: e.g. the border, the background or the font-colour? I'm trying to put a red tick-box on my form (to differentiate one vital one from several others), but I can't seem to find a way. I have changed the border to red (255) and tried various options like flat, sunken etc. but it only seems to work with shadowed - and to be honest that looks terrible.

I've fudged it a bit by putting a coloured box on the form and overlaying the tick-box, but I would have thought there was a better way.

Pat.

View 3 Replies View Related

Please Help...tick Checkbox Before Proceeding To Next Record

Jul 5, 2007

Apologies as I've already asked this question in the forms section of the forum but the responses were a bit on the light side...I'm now getting desperate having spent much of the day trying other sources such as google (even the advanced searches as advised in a different thread)...somebody help please...

I'm just want to make sure that my IT illerate users have to tick a checkbox before they can view the next record with a message box appearing to ask them to tick it if they haven't.

I've seen a few threads on much more complex scenarios but have failed to plagiarise anything, it must be pretty basic to do right?!?

View 12 Replies View Related

Code To Tick Box On All Records In Table

Jan 29, 2008

I need the code that will tick the box in all records in a table

Thanks,

Richard

View 1 Replies View Related

Tick Checkbox If Database Is True

Dec 3, 2006

Hi,
in my web page, i would like to user to see a ticked checkbox should the database = True however, i cannot seems to be getting it. Would anybody be able to help me out?

strSQL = "SELECT DeptHeadA FROM Employee WHERE EmpId = '" & strEmpId & "'"
nRecDHA = GetRecordset(strSQL, arrDHA)

if arrDHA(0,i) = True then
arrDHA(0,i) = "Checked"
else
arrDHA(0,i) = ""
end if

<tr>
<TD valign=top width="27%"><font size="2"><b>Department Head Alternate (1st) :</b></font></TD>
<td width="72%">
<input type="checkbox" name="DeptHeadA" value="<%=arrDHA(0,i)%>"></td>
</tr>

View 2 Replies View Related







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