Access VBA In A From (when Checkbox Is Ticked Then Put Text In Field In Table)
Jan 17, 2014
I have 2 tables both linked to SQL Server 1 has policy information and the other has error information both tables are linked with the relationship policy Ref. The error table(table2) has fields Pol ref, Error_Type,error, Comments, response_comments and response_Date.
There are 25 types of error so what I have done is copy all fields from table 2 25 times exlcuding the policy ref and Error_Type but to make them relate to the relevent error I need to setup some VBA code that does an if Error1_checkbox is ticked then make Error_Type ="error1" and Error=1 else if error1_checkbox is unticked then make error_type null(blank).
I am using ACCESS 2010....
View Replies
ADVERTISEMENT
Aug 19, 2015
I'm a novice user of Access 2013.
I would like to be able to use a checkbox control to make either text boxes or forms appear when ticked, ultimately to stop a form being so untidy/to conserve space. I'd be using this on multiple occasions.
(If actioned, would it automatically shift the other controls in the form down to make space, or would it just overlap?
View 4 Replies
View Related
Dec 20, 2005
Hi All.
What I would like to do, is have a form popup when the main form is opened in my db, which will detail all the changes I have made to it since the last version (this bit is OK) and also, I would like a checkbox on the popup form, that the user can tick once they have read the details so it will not show up everytime they open the main form. (Just like the "hidestartupform" property within the Northwind Database)
I create the form and all that, but do not know how to do the checkbox so once it is checked, the form will not appear.
Hope this makes sense and someone can enlighten me and point me in the right direction?
Many Thanks.
Frank.
View 4 Replies
View Related
Jul 10, 2015
I am working on a database which will basically serve to be a massive Auditing Checklist. Lots of "Is this done" type yes/no questions to record, some with a comment.
Brief Description: I have many child-forms on a tab-control, each with a different heading/category of things to check for. When someone visits a store, I would like them to record their findings in this form.
In the above example, if the Floors are clean, no input is necessary. If the floors are not clean then the user ticks the checkbox and the text "Floors were not clean" should be automatically entered into the field: Cleanliness 1. The reason for this is that I wish to link the value from this field to a Microsoft Word document using mail merge for reporting purposes, and in the report it needs to state any problems in full sentences.
I have tried using this code in order to update the comment field when the checkbox is ticked, however, the problem with this is that I would have to insert code manually for every single checkbox in my forms, and I have about 150 checkboxes in total.
Code:
Private Sub Cleanliness_A1_AfterUpdate() If Cleanliness_A1.Value = -1 Then 'If checkbox is checked
Cleanliness_C1.Value = Cleanliness_C1.DefaultValue
Cleanliness_C1.Enabled = True
Else
Cleanliness_C1.Value = ""
Cleanliness_C1.Enabled = False
End If
End Sub
View 14 Replies
View Related
May 16, 2014
I'm trying to get an Insert statement to execute whenever the user ticks the tickbox however my code is failing to find the output table 'Manager':
Code:
Private Sub Check34_AfterUpdate()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim varItem As Variant
Dim strCriteria As String
[Code] .....
View 6 Replies
View Related
Jul 14, 2006
Hey Guys,
I'm looking to create a "Same As Billing Address" check box that would automatically udpate the address in an order to reflect the customer's billing address.
I understand how to sync a combo box to an option group ( -- great article by the way)
I Guess what I'm looking to do is:
1. Sync a "Same As" Checkbox to multiple text boxes in the form (Unit, StreetAddress, City, Province, Postal) such that these fields are UPDATED (writen to) with the same information as the billing address
2. [U]IF the "Same As" Option is selected, I need the updated fields to lock, allowing no further update... but must by unlocked if the "Same As" option is NOT selected.
Please help me out with this one guys.. I really need it.
View 2 Replies
View Related
Mar 8, 2013
My database has a text field "Status" where the text is either, A, W, C. There is a form to update this field; currently it uses a standard Access created text field. The users want a checkbox which will show up as checked when the status is W, if the status is anything else, the checkbox will be blank. If the user clicks the checkbox within the form the status will be changed to W.
If [table.status] = 'W'
then checkbox = 0
else
checkbox = -1
and then somewhere on the update it would be
if checkbox = -1 then [table.status] = R
Except that Access doesn't think the way I do.
View 1 Replies
View Related
Mar 29, 2006
I have a column in a table that only is allowed one value, "Repealed" or simply left blank. I would like to have a checkbox on a form that enters the word "Repealed" or removes it depending on whether it's checked or not, rather than having the user enter the word "Repealed" each time.
Can anyone offer direction as to how to complete this? I've not had much experience with VB code.
Thanks
View 4 Replies
View Related
May 10, 2013
I there a way to determine whether or not my checkbox within a form is ticked or not dependent on another value within a field?
I have a field called 'DaysRemaining' and another check box field called 'Expired'. I want the expired checkbox to be ticked if the value within 'DaysRemaining' is '<0' and unticked if '>=0'. Is there a way i can do this within the control source of my check box?
View 1 Replies
View Related
Jan 29, 2015
I am writing the following code to check if 'Active' field in table TypeTable2 is ticked or not for records. If I write the following statement to select the records from Access table where Active is not ticked then it gives "data Type mismatch in criteria expression".
Code:
strsql = "SELECT distinct EnvelopeType FROM TypeTable2 where Active='Yes'
View 3 Replies
View Related
Oct 31, 2013
I'm trying to change Selected text color in an Access data Field. I want the change to be permanent and show up in reports.
View 1 Replies
View Related
Nov 5, 2012
How the value is stored on a Yes/No check box in the table. I need to check to see if it is checked to perform some calculations.
View 8 Replies
View Related
May 8, 2006
Hello to everyone,
I have a colleague who executes a make-table query that reads a txt file. While doind this, he wants to convert two columns (binary format) to checkboxes (Yes/No format). Is there a way to do that?
Thanx in advance
View 1 Replies
View Related
Jan 25, 2013
I have an access file that is using a linked Oracle table.
When I open the linked table in Access, I want to have a column display as a checkbox like the YES/NO Access datatype does.
How I can accomplish this?
View 7 Replies
View Related
Aug 15, 2013
Im constructing a form with check boxes next to names. Id like to have the checked names input serially into a single table field like:
IssuedTo
Name1, Name2, Name3
There are 8 possible Names. Is there way to do this without a long complicated If-Else-Then function?
View 5 Replies
View Related
Apr 24, 2014
My database only has one table of data so it's not complicated.I would like to create a form that can create customisable Excel exports of the data based on set conditions and exporting only select fields. URL...I have one table of data (tblCustomers) which contains all of the fields in the box above.
I would like export the data from the table to excel showing only the fields that are ticked in the box (frmCustomReport).The check boxes are named chk then whatever the field name is eg. chkLocation, chkStatus. The labels are the names of the fields in tblCustomers. Is there a way to do this in SQL or VBA?
View 3 Replies
View Related
Jul 24, 2015
We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.
Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)
View 2 Replies
View Related
Oct 10, 2007
Hi all,
I have a text source file and inpul layout i.e. field names start and end positions in excel file. I want create a table in access from the text data using excel file layout.
Can you please help me out in this. I am a mainframe programer and recieved an request to work in access.
View 1 Replies
View Related
Jun 11, 2007
I am wondering if there is a way to automate the pasting function of text from one field into several others in a table without losing the data that is already in the field.
As an example: in 20 fields I have "I love potatoes" and I want to paste the text string, "And I love tomatoes too" in every field without overwriting the original text.
Thanks.
Steve
View 2 Replies
View Related
Mar 8, 2006
Hello-
I'm new here. I think this is the right place to ask.
I'm on Win98 using Office 2000.
I have a database that I use to run a PERL script for the record store I work at.
The database spits out a text & tabs document via a query that I then run PERL on.
My database has these fields:
date added
e-mail address (Primary Key)
name
wants
destination
In my form to enter, I use keywords that correspond to catagories in my website (I sell music, records & CDs) and also exact terms for if a customer is looking for specific items.
an example would be:
20060308
tim@couch-fort.com
Tim
*clrock~~*clrockcomp~~beach boys~~bob dylan
1
The "~~" is a separater for the PERL job.
Is there a way I can put checkboxes on my form that will auto fill data that repeats often, while leaving space for some hand typed info too?
View 1 Replies
View Related
May 24, 2013
I'm having a hard time with this (what I thought) was a simple filter. I have an unbound checkbox (chkFlag) and an unbound text box (txtfilter). The filter was working fine till I decided to also try to filter on the checkbox.
I'm trying to filter records that either have either a check in the [Flag] field or have some part of the text in various other fields. The problem is I can get the records to filter if the checkbox is checked or on text in the various fields, but not both. I've tried using AND and OR, but it's not working.
Code:
Me.RecordSource = "SELECT * from tblContacts; "
'-------------------
strWhere = ""
[Code]....
View 4 Replies
View Related
Apr 12, 2005
Dear All:
I have created a form with students information, name, address, ID number, etc.
Is there a way to place a checkbox on this form that when it is checked, it displays text on a SPECIFIC AREA ON A REPORT?
I wish it to return this text on a report: "HONORS COLLEGE"
Many thanks in advance,
Dion
View 2 Replies
View Related
Apr 26, 2005
Dear All:
I have a form with three items:a checkbox called "Check231", a textbox called "text921" and another textbox called "text762".
What I wish to do is: Enter text in textbox921, which stays the same as I scroll through each record. Then If checkbox check231 is checked, it displays text from textbox921 to textbox762. Textbox762 is bounded to the form.
Any ideas on how to get started?
Many thanks,
Dion
View 1 Replies
View Related
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
Jan 31, 2014
Is it possible in Access 2010 to have an after update that if a criteria text is met, then a checkbox with the text "completed" appears next to it?
Private Sub Text45 ()
If Me.Text45 = "Test" THEN ...
View 3 Replies
View Related
Feb 18, 2014
I have the following code which works perfectly BUT I want to be able to add another line of text if users enable a checkbox. I have tried everything I can think of but can't get it to work. When using an "IF check150" statement it just adds the extra text in regardless of selection or not.
Code:
Function Mail_Radio_Outlook6(activedoc As String)
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim acc_req As String
Set OutApp = CreateObject("Outlook.Application")
[Code] ....
This is fine most of the time but If a user ticks check150 I want to add another paragraph.
Do I use an IF statement, if so in what format? is it a separate function etc?
I am slowly getting more familiar with Access but still come unstuck on the simplest of things at times.
View 3 Replies
View Related