Changing Code Via Text Box

Nov 25, 2005

Hello,
in my Access database there is quite a bit of VBA code.
I have set my LAN and file path in some of this code but will need to change it when this database will get to other users using a different LAN and path.

Is there a way I can avoid them to open the code and manually change this information?
I was thinking of some sort of text box where they will write their path (ex. \S01000sharedoffice*.*) and use a cmdbutton to overwrite the existing path?

Thanks.

View Replies


ADVERTISEMENT

Help Changing Default Sort Code

Mar 1, 2005

I am trying to set the default sort code to something other than the primary key. Example- Book Code is Primary Key but I want the table to be sorted by Title. I have went into properties and used the Order By property and typed 'Book.Title' however when I view the datasheet, Book Code is still the 1st column??? Is it still being sorted by Title??

Any help would be greatly appreciated

View 2 Replies View Related

Changing Property Settings By Code

Dec 2, 2006

This is getting into some stratospheric territory for me.

I am trying to change the visibility property of a label and corresponding text box, based on the contents of a different combo box. cboHow is a combo box that uses a value list as its row source, since the content of the list won't change. There are three fields that I need when the content of cboHow = "FIS". Otherwise I don't need them and I don't want to see them. My code is below:

Private Sub txtFISDepartmentNumber_BeforeUpdate(Cancel As Integer)
If cboHow <> "FIS" Then
lblFISDepartmentNumber.Visible = False
txtFISDepartmentNumber.Visible = False
Else: lblFISDepartmentNumber.Visible = True
txtFISDepartmentNumber.Visible = True
End Sub

At the moment there is no error code, but the label and text field don't respond by becoming visible/invisible when the contents of cboHow changes. Do I put this code with the txtFISDepartmentNumber or in cboHow? and do I use BeforeUpdate or AfterUpdate? Should I have a separate If..Then..Else for the label and the text box?

I have been playing around with this for several hours now and seem to be going in circles.

I am using A2K

View 7 Replies View Related

Changing Field Attributes In Code

Jan 24, 2007

I know that I can use an Alter Table query to add table fields from code.

But what if I just want to change a field from being Required or Not Required, or perhaps change the field width of a text field?

How do I do that from VBA?

View 1 Replies View Related

Changing Access Code Page On Web Server

Oct 10, 2004

When I send a database to server it changes all of my special charters to unicod charterset, I suposed that server is on american charter set, I would like it to change to central europien windows - 1250 code page, is it posible and how? it is very importand to me.
thx

View 1 Replies View Related

Changing Vertical Scroll Bar Position Of A Form With Code

Sep 15, 2004

Is there a way to change the vertical scroll bar position to always be at the top when I move from form to form. Right now, it will start at the top, but when I move to a different form and back, the vertical scroll bar is positioned in the center. I turned off the autocenter property of the form and saved it in the desired position, but that doesn't work. My form is maximized when it opens. I would greatly appreciate some help. This has been an annoyance for quite some time now.

View 1 Replies View Related

Modules & VBA :: Changing Record Source On A Form - 2 Different Outcomes Using Same Bit Of Code?

Apr 28, 2015

I'm changing a record source on a form when the user clicks a "save" button.

I'm doing this to store a value from the current form in a table that is not part of the default form query.

This works fine.

I have a separate button on my form called "Home", when the user clicks this button it requerys the current form which triggers the before update event to run, this in turn brings up a message box which asks the user if they want to save or not. If they click yes then it runs the SaveButton click() code.

For some reason when the user presses the save button and then exits, everything works but if a user presses the “home” button which triggers the save button then it brings up the “2107 The Value you entered doesn’t meet the validation rule defined for the field or control.” Runtime error and stops on the change recordsource command.

Why triggering the same code directly from a button or indirectly from a before update event has two different outcomes.

View 4 Replies View Related

Changing Date To Text

Jun 30, 2005

I have searched and found references to converting text to dates. I need to go the other way. I have client# field and a date field. I would like to make an update query to populate a new field by concatenating the two fields minus the "/". I am making a new key field in an existing table. Then in the future when data entry is done, I would like to convert the date and client# as they are entered. I was looking at using the left$ or right$ function, but the dates may be in mm/dd/yyyy format or m/dd/yyyy format or m/d/yyyy and so on, depending on the month and day. Is there an easy way to convert the date to a number? I tried datevalue, but it leaves the "/" in there. I'm not sure how to section off the parts of the date I need, when the month and day vary between 1 and 2 digits. Thanks for any help.

View 6 Replies View Related

Changing A Text Value In An Expr:

Nov 27, 2007

Hello all,

I'm using M$ Access 2002. I have a query which contains an expr as one of the fields. The expression adds three text fields together to create a salutation. This is the expression:

Expr1: [students].[Fname] & " " & [students].[LNAME] & " " & [students].[gradelvl]

Where all three fields are of the Text data type. I am trying to display the students grades for next year. So if the value of [students].[gradelvl] is "10", it should display "11". If it were a Number data type I think this would be easier for me to figure out.

Any ideas?

Thanks for your help,
cheers maX

View 2 Replies View Related

Changing The Color Of A Text Box

Dec 21, 2004

This is very close to the label question that I also have posted. I am trying to get my report to have the back ground of some text boxes turn yellow if they are populated. I can get them to turn yellow, but they turn yellow whether they are populated or not. I have the code in the Report Open event. Here is some of the code that I have.

If Not IsNull(MMSJob) Then
MMSJob.BackColor = 65535
Else
MMSJob.BackColor = vbWhite
End If

Can anyone help me?

learnasugo

View 7 Replies View Related

Changing Vertical Text On A Report

Oct 2, 2005

Not sure if this is possible but I have a few text boxes on a report set to vertical yes under properties. They print fine, but on the pre-printed forms I'm using they print upside down. Is there a way to realign they way the text prints when using the vertical yes setting? I really need they text to be inverted. I'm I asking an impossible question? Thanks..

View 1 Replies View Related

Changing Case In Text Fields

Sep 1, 2006

Hi

Is there a way of changing the case of text that has been entered in a table?

Want a form to display capitalised names, say, no matter how they were entered. Know that they can be displayed in all caps using >.

Thanks

View 6 Replies View Related

Modules & VBA :: Changing From Integer To Text

Nov 23, 2014

I am having a query which having a category field like Electrical, Sports, House hold etc.

What I want that if i select Electrical then it should return 15, if Sports then 10 and so on i think this could be done through this below mentioned VBA but it need change from integer to text...

Option Compare Database

Public Function fncGrade(intNum%) As String
Select Case intNum
Case 0 To 1: fncGrade = "Same as Previous"
Case 2 To 32: fncGrade = "C-3"
Case 33 To 40: fncGrade = "C-2"
Case 41 To 50: fncGrade = "C-1"
Case 51 To 60: fncGrade = "B-3"
Case 61 To 70: fncGrade = "B-2"
Case 71 To 80: fncGrade = "B-1"
Case 81 To 90: fncGrade = "A-2"
Case 91 To 100: fncGrade = "A-1"
Case Else:: fncGrade = "X-X"
End Select
End Function

View 5 Replies View Related

Changing Rowsource In A Combo Box Depending On The Text In Another

Jul 10, 2007

Hi all,
I am trying to have the rowsource change on a "subcategory" combo box depending on what the "category" combo box says.

I added an event procedure to the "Category" combo box which changes the Row Source in the subcategory combo box to something else. I'm not sure that I did this right as if I close the database and reopen it, what I selected in the subcategory combobox is gone and it is blank. Any ideas? Here is my simple, likely incorrect event procedure:

Private Sub Category_Change()

If Category.Text = "Rare Books" Then
SubCat.RowSource = "scRareBooks"

End If

If Category.Text = "Legal Documents" Then
SubCat.RowSource = "scLegalDocuments"

End If


End Sub

Thanks!

View 5 Replies View Related

Help In Changing Number Value To Text On Report Of Combo Box....

Feb 15, 2008

I am using a combo box to enter Employees names for training hours...I want to use a pivotchart but when i use the training hours table/form the pivotchart gives me the combo box numbers instead of the names. I know there is a formula or something I am suppose to use here or even a query but I don't have a clue as to how to do this....if someone would be so kind in directing me with instructions and help...thanks
:confused:

View 4 Replies View Related

Changing Text In Queries Based On Date

Dec 9, 2006

Hiya All

Hope you can help me here


I need help with an update query that will change records for me based on the date

In the record I have a TEXT record called [GI1] that can have a multitude of data in it.
The data can be EVA, CON 10/12/06, REQ 10/12/06, PAS 10/12/06, or B 10/12/06, and finally A 10/12/06

What I need is a query will look at the Data that starts with B and change the letter to A if the date in the record has passed. {The Date can be any date in any year }

Many Thanks for Looking

Paul

View 2 Replies View Related

Changing Text Colour Of Labels On Activate

Nov 23, 2005

Hi, im working on my school project for A2.

When the user clicks on say; the customer ID dropdown menu, i want the label text on the right of it to get darker (make it more visible). How can i do this?

(i have attached a picture of my form)

thanks, Robin

View 2 Replies View Related

Changing Command Button Text Colour.

Jun 30, 2006

Hi all,

I'd like to change the colour of the text in a command button when the user click the button, but for the text to return to it's original colour when the botton pops back up.

I'm assuming you use the following commands:


Private Sub cmdClose_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
*******CODE********
End Sub

Private Sub cmdClose_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
*******CODE********
End Sub


But I'm not sure as to how I would enter the correct code.

Any help would be appreciated,

Best Regards,

Aaron

View 2 Replies View Related

Changing Color On Multiple Text Boxes

Jan 18, 2005

I have about 25 text boxes on my form that use the dcount or count functions to obtain a number. (Text boxes are labeled 'Text1' through 'Text25')
When the value of the textbox is 0, I would like to have the color of the text box turn red.

Is there a way I can do this using a for loop? Or a with statement?

Checking each one individually just seems like poor programming.
Any thoughts? Ideas?
Thank you.

View 2 Replies View Related

Queries :: Changing Text To Hyperlink In Query

May 7, 2014

I was trying to see if there is a way to convert text to a hyperlink in a query.

Background : I'm pulling information from a lotus notes database using an OBDC connection and storing it into an access database and using that to upload to a sharepoint site. While we are converting over to a sharepoint site, I was trying to make it easy to get back to the original site for each document to check the work.

One of my columns in the query looks like this:

Code:
Notes Link: "notes://pncpgha66/852570CE0056FEF3/0BFCC83A5C11D7C3852576CD0072ED3E/" & [NoteUNID]

I don't see a way to convert that whole part to a hyperlink though. Like I could with a date and text. Cdate().

View 1 Replies View Related

General :: Changing Text So That First Letter Is Uppercase

Nov 24, 2012

I want to change text in txt boxes. when a new customer is being created we are too lazy to put uppercase in. so i want to change the text so the first letter is uppercase. i have used this on every event and it doesn't change a thing.

PHP Code:

Private Sub txtTown_AfterUpdate()LResult = StrConv("TECH ON THE NET", 3)End Sub
Private Sub txtPostcode_AfterUpdate()LResult = StrConv([txtPostcode], 1)End Sub
Private Sub txtStreet_AfterUpdate()LResult = StrConv([txtStreet], 3)End Sub
Private Sub txtFirstName_BeforeUpdate()LResult = StrConv([txtFirstName], 3)End Sub 

I have this at the top

PHP Code : Option Compare DatabaseOption ExplicitDim LResult As StringDim LResponse As Integer 

View 6 Replies View Related

Forms :: Changing Color Of Text On Labels

Aug 14, 2015

I have three labels that I can't change the text color. I must have them locked or something. What should I check?

View 5 Replies View Related

Forms :: Changing Border Of Text Box Depending On Value Of Field

Jan 9, 2014

I have a box with age in called [agecalc]. I want to change the border of the box to red to indicate they are a Juvenile if under the age of 17.I already have some code to write the text, I just need to change the border of this text box called agebox

=IIf([agecalc]<=17,"Juvenile!!")

View 1 Replies View Related

Modules & VBA :: Changing To A Record Based On Text Box Entry

Sep 16, 2013

i have a database with a large number of records. Navigating through the records through a form one by one is a pain, so i want to create a text box where you can enter the ID number of the record, and whichever record has the matching ID number it changes to that specific record. I know that something like this is already apparent at the bottom of Access, but i want my user to do everything within the database itself, as all of the panes are removed whilst being used

View 11 Replies View Related

Forms :: Add Percentage Sign To A Text Field Without Changing Value

Apr 7, 2014

I am trying to add a percentage sign (%) after a number I get from a table, thus the number 1,5 should display 1,5% and NOT 150%.

I am using the Format Property of the text field.

I tried #,##% which converted the value to a percentage (1,5 became 150%) Then I tried #,##"%" and #,##\% Access ignored both and changed the value in the property field to #,##% Using the Format function is not an option because it is a bound field which should be editable.

View 3 Replies View Related

Modules & VBA :: Changing Combobox Text Based On Listbox Selection

Jul 26, 2013

I have a listbox with several options.

When the user selects one of these items, i want a combo box's text to be changed to the selected item in the list box.

The listbox is named : D_OutputLsb
The combobox is named : D_ComponentNameCmb

View 4 Replies View Related







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