General :: Get Text Value Of Enum?

Aug 17, 2012

Code:
Public Enum Test
a=0
end enum

How can I return a instead of 0?

View Replies


ADVERTISEMENT

Enum Or Array?

Dec 27, 2006

I have built the first part of a table analyser into one of my projects as below:

It lists a complete list of tables except system tables for the db being assessed and writes all the table names to a table then the table properties, the fields plus there properties And relasionships and Indexes.

The Idea behind this is When I build a system I always use a frontBack Arrangement and versions within my management system.

there are always two Datafiles one the working datafile where the changes are made during design and the production model used by the users which is the one that will need to be updated by this tool.

The problem I'm having is I don't need to store all the field properties within the tables as a lot wont be used for updating the production model.

So I've been looking at ways I can generate a list of property names that I want stored so when my code loops through the properties list it can before writing the property name and value to the table check it against a list.

My question is would it be better to use an array or enum so I could check for an item and how could I best achieve this as I've not used enums before and I'm not that good at Arrays but there's more help there.

I have in the past used a list like: Prop1,prop2,prop3 which I then check using instr like instr("Prop1") which will return a start position so I know it's in the list but I think this is a bit messy so want to make the improvements

Any help would be much appreciated

mick

View 2 Replies View Related

Modules & VBA :: Why Isn't Enum Returning Correct Value

Aug 7, 2014

I am using MS Access with SharePoint Lists and some Access Tables to generate reports in pre-formatted MS Excel Worksheets. My main module opens several classes. One of the classes receives a worksheet to keep in a historical book. This class can receive any one of several different types of pre-formatted worksheets. After all is said an done the class adds a cover sheet to the consolidated workbook and adds hyperlinks to the other sheets, kinda like a table of content.In the class I have the following in the general declaration.

code:
Public Enum BookType
A = 1
B = 2
End Enum
Private pBookType As BookType

Later in the class I have the following:

Code:
Public Property Let LoadBookType(ByVal btNewValue As BookType)
pBookType = btNewValue
AddWorkBook
End Property

in the main modual I have the following

Code:
classConsolidated.LoadBookType = A

When assigning the above property it passes in "11"

if I change it to the following

Code:
classConsolidated.LoadBookType = BookType.A

it passes in "1" as I expect and use in a Select Case statement later in the class.So why does one pass in "11" but the other passes in "1"?

View 14 Replies View Related

General :: Text Box On Report To Autofill Using Fixed Text From A Label On Different Form

Jun 23, 2015

I am using Access 2007 and 2010. I would like a text box (or label) on a report to autofil using fixed text from a label on a different (closed) form.

View 8 Replies View Related

General :: Text Box To Displaying Some Text When Subform Value Is Null

Sep 5, 2013

I have a form that is displaying a subform (of which source is a query). I have got the data from one of the columns in the subform going into a text box (entered in the control source) however when the field is empty it comes with a #Error in the textbox.I want the textbox is display some text is the subform value is null.

View 11 Replies View Related

General :: Search For Highlighted Text In Rich Text Box

Oct 1, 2012

Is there a way of searching a rich text box for any text which is highlighted and then deleting that text? I cannot find an answer to this anywhere..

View 2 Replies View Related

General :: Text Box With Text Staying Same In Each Record

May 31, 2013

I have a text box in a form (unbound) and when I go to add text into it, the text carries over from one record to another but I want it to be exclusively for that record.

View 8 Replies View Related

General :: How To Split Int Between Text

Jul 3, 2015

I have a group of part number doesn't come with a standard format. It is very tricky since some does come with some regular flow but some are not. Therefore i try to take 2 different sample category.

My idea is to split the LPN into 3 column eg. CIVUS (Type), 0.13(SIZE), BR (COLOR)

TRA_LPN TYPE SIZE COLOR
CIVUS-0.13-BR
AVS3.0G-B
AVSSH-2.0F-G

TRA_LPN
AGP0219-2.5-GY-O
FLRYY-4X0.75-B
V-R2-0.75-W
V-R2-0.75-Y

View 8 Replies View Related

General :: Searching By Text Box

Mar 17, 2014

I want to know how to create a test box one or more than one and can search with a button. I did that but I have to fill all the text box to have a result and i want to know how to search even if i did not fill all the text box ...

View 2 Replies View Related

General :: SMS Message Text

Dec 14, 2013

I've now got my database firing off SMS text message.The only thing I'd like to improve would be the body of the text.Right now my code for my message is

Message = "Hi"

I'd like to incorporate some fields to speed things up so I could have things like..

Message = "Hi" [Customer Name]".

View 4 Replies View Related

General :: Showing Blank For 0 Text Value

Jan 13, 2014

I have a report that is based on a query I have made. It currently shows the values as kept in the table. It is for a MAR sheet. Here is how it looks...

Breakfast 0
Lunch 0
Teatime 2
Bedtime 1

I want it to show blank for each 0 that is shown. I have tried an Iif statement to do this but it doesn't seem to work.

View 9 Replies View Related

General :: Importing Text Into Access

Apr 17, 2013

creating a import form into access.File format is txt (tab delimited)

Ideally I need:
- a box to enter the file name
- a box to enter the path
- a import button to push

I have seem some comments saying you have to creat a transfer text.However I have no knowlegde of Coding, opening or closing statments..

View 1 Replies View Related

General :: Convert Text Into Time

Feb 12, 2014

How do you convert text stored as 300 (which is 3 pm) into a time field?

View 8 Replies View Related

General :: Clearing Text In Specified Columns

Oct 31, 2013

I am creating a database that keeps track of everyone who is currently "In" at work. I am giving a set number of people "administrative" access to the backend where they can view the status of everyone. The plan is to have them export each daily report into an Excel document. Every morning when the administrator comes in, he/she will need to click a button that clears everyones status so they can start over. The employees names and payscale stays the same and does not clear.

I am all about automation! If there is a way where the specified fields automatically clear, say after midnight.

View 2 Replies View Related

General :: Converting BUF File To Text

Oct 26, 2012

I have a file called CAPTURE.BUF. I am trying to convert it to text. Here is what I ahve done, but I get the message box ever time.

Public Function copyFile()
Dim SourceFile As String
Dim DestinationFile As String
SourceFile = "C:PCPICSWCAPTURE.BUF"
DestinationFile = "C:INVESTMENT_REPORTSCAPTURE.TXT"
On Error Resume Next
FileCopy SourceFile, DestinationFile
If Error > 0 Then
MsgBox "Could not copy mls file."
End If
On Error GoTo 0

End Function

View 9 Replies View Related

General :: Filtering A Listbox Using Text Box?

Jul 31, 2013

I have a form on which I use combo boxes to filter a listbox using the following code.

Private Sub FilterpartsList()
Dim strRS As String
' Filter the list box appropriately based on the combo box selection(s)
strRS = "SELECT partsquery.partname, partsquery.Heritage, partsquery.Description FROM partsquery"
If Not IsNull(Me.cbomodelID) Then
strRS = strRS & " WHERE modelID = " & Me.cbomodelID

[code]....

View 5 Replies View Related

General :: Text As A Number With Commas

Sep 17, 2014

I have several fields that were set up as text fields since the numbers would never be used for calculation. But now my users want to see 100,000 instead of 100000. I have looked everywhere for an answer but do not know if it is possible without retyping the data. The text or rather the numbers that are text can be from anywhere of 1 to 1,000,000 plus. They are just used to show population figures. How to do this with formatting?

View 9 Replies View Related

General :: 1.7 GB Text File Could Not Be Imported

Jan 6, 2014

I need to import a text file into access 10, the problem is as i understand it access has a db limit of 255 columns.

The text file is delimited by | symbols. As i tried to import, it shows me to have 267 columns and all the columns are unique and needs to be used for my work.

View 1 Replies View Related

General :: Customer Text Box Validator

Mar 15, 2014

I have 2 controls, a textbox and combo box. I want to prevent users from entering anything other than number integers on the textbox and only strings on the combo box.I want codes that will prevent users by customized msgbox instead of default access error message. I am using ms Access 2010.

View 2 Replies View Related

General :: Converting Plain Text To RTF

Feb 9, 2013

Using 2010 (accdb format) on windows 7.I'm trying to convert a memo field's format from Plain Text to Rich text. The problem is that every time I try to select the Rich Text format option the field immediately changes back to Plain Text.

Just as a test a created a new memo field in the same table and set this to Rich Text (worked fine) then copied the records for the Plain text memo field to the new memo field. Unfortunately this removed all line breaks so instead of my text looking like

View 3 Replies View Related

General :: Text Box Based On Field Value

Jun 26, 2013

Is there a way to have a text box filled out based on the value of a field. There will be only 2 possible phrases for the text box.

=IF( <Expr> Forms![Workorder]![Disposition])=("Return As Is","DISAPPROVE","APPROVE")

This is what I have tried but I get syntax error.The form is Workorder and the field is Dispostion. When the Disposition is "Return As Is" then I want to have the text box yield "DISAPPROVE" otherwise it should be "APPROVE".

View 14 Replies View Related

General :: Input Value (Text) As Field Name

Oct 2, 2014

Is it possible in Access to use an input value (text) as a field name? I want to access a field based on what the user enters.

View 6 Replies View Related

General :: Copying Hyperlink As Text

Mar 15, 2013

I need to get an email address from a field and place it onto another form.. HOWEVER I dont want it as a hyperlink, nor do I want the mailto blah blah coming over.. I just want the email address as TEXT.In the application the user opens the email form by clicking an icon on an invoice screen, this will allow them to automatically email to the client.. Once they open the email screen they naturally see an arrangement of other boxes where they can enter subject, email description etc..

At the same time there are two boxes, the "To" box and the"From" box... I want these boxes to be auto updated with the email address (to save time). When the user clicks the icon on the invoice screen it automatically copies and displays the email address of the client in the "To" box on the invoice.. The problem I am having is that it is displaying as useless information which is associated with the hyperlink.The email address comes from a field that has already previously been associated as a hyperlink, and it HAS to come from this field, I have no way around it.... All of this information is coming from an address book section from a field that is a hyperlink field.. If it was a txt field then I would not be having this problem.

As I already have various forms open displaying information I am able to used simple code to fill in various bits of info to save time... Because of this I am using simply code to copy the email address from one form to another:

Forms![Email]![To] = Forms![AddressBook]![Email]

Obviously the above code is simple and works for 90% of this type of approach, however there must be some other code that I need to use to first translate the email address to text...

In the end I don't care what I have to do as long as it works.. Remember though that the original field is a hyperlink field and must remain so, I cannot simply convert that to txt..

View 1 Replies View Related

General :: Text Box To Display Total?

Jul 17, 2014

There are 2 images I am inserting, I want on the Access form to display the total of row (each row is batch number) in the box after pressing the button in the form. based on Product code, date and table numbers.

View 7 Replies View Related

General :: Error Messages On Unbound Text

Jul 8, 2015

I created a database and released it for my team (frontend/backend setup). however, most of the members on my team are getting #Name? or #Invalid on some dlookup formulas in unbound text boxes. However, on my version, I see the actual data shown.

I tried adding the Microsoft references via the VBA screen, but that only worked for one person.

View 14 Replies View Related

General :: Field Was Changed From Text To Memo

Jan 6, 2013

The database contains the records of a collection of thousands of photographs and negatives.

One of the fields contains information on the subject matter of each pic and can sometimes be very long. The field was changed from text to memo so as to hold more characters but they appeared in one long string, which means a lot of scrolling to see the information. That has been changed back to text and we are adding a second or third record such as xxx-xxx-xxx cont1 xxx-xxx-xxx cont2 so as to get shorter strings. Is there a way to make the text wrap onto a second or third line automatically after a specific number of characters have been entered or can a carriage return be put in to force the text to a new line?

View 5 Replies View Related







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