Populate Text Box by Selection Dialog

I have a Field called StoredLocation, it will be the saved path of a
drawing file. Instead of having the user type this value in, I would
like the user to be able to select the file and have the field filled
out automatically.

How/Where do I start?

0
Thomas
6/4/2007 5:27:56 PM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
981 Views

Similar Articles

[PageSpeed] 46

Its not easy to do and will involve a LOT of code. If you still want to do 
it, you can probably find it documented via Google.

"Thomas Maleski" wrote:

> I have a Field called StoredLocation, it will be the saved path of a
> drawing file. Instead of having the user type this value in, I would
> like the user to be able to select the file and have the field filled
> out automatically.
> 
> How/Where do I start?
> 
> 
0
Utf
6/4/2007 6:35:02 PM
To allow the user to select the file using the standard Windows File Open 
dialog, see http://www.mvps.org/access/api/api0001.htm at "The Access Web". 
While that code may look intimidating, all you need to do is copy everything 
that's between Code Start and Code End into a new Module (not a Class 
Module), and then use code like the first 4 lines of sample code on the page 
to retrieve a specific file.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Thomas Maleski" <tmaleski@maleski.com> wrote in message 
news:1180978076.550188.45620@q66g2000hsg.googlegroups.com...
>I have a Field called StoredLocation, it will be the saved path of a
> drawing file. Instead of having the user type this value in, I would
> like the user to be able to select the file and have the field filled
> out automatically.
>
> How/Where do I start?
> 


0
Douglas
6/4/2007 6:42:20 PM
No, I don't want the database.

Are you saying you've got a continuous form, and that setting the value for 
a particular text box puts that value in that text box on all rows? Is the 
text box bound? If not, that's your problem: the text box must be bound to a 
field in the underlying recordset.

BTW, the code I cited earlier is much better than the approach outlined in 
that KB article. The Common Dialog control (which is what the KB article 
recommends) is very prone to problems. The API approach I referenced isn't.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Thomas E Maleski" <Thomas E Maleski@discussions.microsoft.com> wrote in 
message news:F0399114-DBA3-4212-94AD-08DFD9BAA828@microsoft.com...
> Looking at Article 824272 I was able to select file(s) and have it 
> populate
> the list box but it puts it for every entry. How can you limit it to only 
> one
> common db line?
>
> I can send you the mdb file if needed, I  only have 5 entries for testing.
>
> "Douglas J. Steele" wrote:
>
>> To allow the user to select the file using the standard Windows File Open
>> dialog, see http://www.mvps.org/access/api/api0001.htm at "The Access 
>> Web".
>> While that code may look intimidating, all you need to do is copy 
>> everything
>> that's between Code Start and Code End into a new Module (not a Class
>> Module), and then use code like the first 4 lines of sample code on the 
>> page
>> to retrieve a specific file.
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Thomas Maleski" <tmaleski@maleski.com> wrote in message
>> news:1180978076.550188.45620@q66g2000hsg.googlegroups.com...
>> >I have a Field called StoredLocation, it will be the saved path of a
>> > drawing file. Instead of having the user type this value in, I would
>> > like the user to be able to select the file and have the field filled
>> > out automatically.
>> >
>> > How/Where do I start?
>> >
>>
>>
>> 


0
Douglas
6/14/2007 3:36:34 PM
Reply:

Similar Artilces:

Format Currency field into zero filled text field
I have a field that can be blank or contain a currency amount. No matter what the value is I want it to be a zero filled field. So for $9.99 I want 0000999 for a blank field i want 0000000 if it is $990.00 I want 0099000. It seems I can get parts to work. Format(Salary, "0000000") returns the amount rounded so I lose cents if I use Format(Salary, "00000.00") i get it to work but have to manually remove space. The other problem I am having is having it zero fill when no value Thanks, Marcie Try: Format(Salary * 100, "0000000") -- Duane...

Change fg color of a static text at runtime
How can I change fg color of a static contol base on caption's text. I can set fg/bkg color using OnCtlColor at dialog's startup but I need to change color base on a math result, if this is positive set as blue if math result use red. thanks in advance for your help, Eduardo You would still do it the same way. Create appropriate brushes(or use SetTextColor etc) and return these based on the context(math result). OnCtlColor is called whenever the control needs to be redrawn(not only at startup). -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Eduardo" <a@a.com> w...

How to include text based on a user's response
Hello, I'm building a letter template at the moment and I'd like to be able to include text based, for example, on a user's response to a prompt. (This is the most straightforward way I can think of doing this, but I'm open to other suggestions.) The letter template concerns contract extensions, and for those circumstances where a contract had already been extended once, then I'd like an extra sentence to be inserted into the letter. Any help on how this can be done would be greatly appreciated. Thank you. P.S. I have no experience with Visual Basic...

Excel Data Input Box
Hi Everyone, This is my dilemma. I am looking for a way to create a data input box that will put data into a spreadsheet one entry at a time and then drop down a cell. I want to put the information into a spreadsheet in a uniform fashion. Gary Don't understand your need. If you enter data in A1 then <ENTER> you will drop down to next cell. "Uniform fashion" means what? Gord Dibben Excel MVP On Thu, 15 Dec 2005 22:56:00 GMT, "GaryC" <u16704@uwe> wrote: >Hi Everyone, >This is my dilemma. I am looking for a way to create a data input box that >...

WM_CREATE not received in dialog's controls
Hello, I am trying to make a 3d visualization panel deriving th CButton class. For that, I need to initializa som stuff after the control (inside a dialog) has a valid HWND but before it paints itself for the first time. At first I done it programatically creating the control and placing the 3d-initialization code inside the WM_CREATE, and it worked right. But I want to create the control from a resource ID, not programatically, to avoid the need of positioning and sizing tasks. And there lays the problem: I use DDX_Control to associate the resource ID and the member variable for the ...

Requery Combo box in popup form
I have a form set-up as a popup in datasheet view with a combo box. The combo box is used to assign a room to a student. I have a check box that is used when the student checks out. When I select the check box, it removes the students name from the table that provides the source for the combo box (amongst other things as well) via a macro on the after update event for the form. I then have the form's after update macro do a requery so when I go to a different record, the combo box will be updated. Unfortunately, the requery command does not work with the form set up as a...

Viewing Plain Text in Outlook 2002
I am not able to read any text in the body of an email message sent plain text. I can view the preview, in the preview window, but when the message is opened, no text. HTML comes through just fine. Any ideas? ...

format the data fields in address box
I cannot click into the data fields to insert spaces or line breaks or punctuation. Fileds appear in one long string separated by commas. stay in one thread please. Where are you seeing the field as one long string? Sounds like you're talking about a csv file not xls. -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression "jankappes" <jankappes@discussions.microsoft.com> wrote in message news:766A75DF-A39E-4EF6-908F-3977140D34BA@microsoft.com... > I cannot click into the data fields to insert spaces or line breaks or > punctuation. Fileds appear in o...

can me and my wife view the same mail box content?
my wife and I share a computer and when we check email the messages stay in that users in box. Is there a way to have it so all the mail can be viewed without changing users? -- Boyz Use the same Profile, and or, point OL to the same pst, and ensure it is set as the default "boyz_65" <boyz_65@yahoo.com> wrote in message news:55F6BAA0-EA0E-4A9B-8A5E-6778D94A9B44@microsoft.com... > my wife and I share a computer and when we check email the messages stay in > that users in box. Is there a way to have it so all the mail can be viewed > without changing users? > -- ...

selecting the first value in a list/combo box as the default
How do I input the first item from a list/combo box in a form if the user doesn't select any other item? I want the first item to be the default entry to the form field if the user did not select any other value. I'm a newbie so if you could suggest creating expressions instead of codes, it would really be much helpful. Please help. I'm kinda stuck in a fixed assets inventory project. Hi max, Open the form in design view. Select the combo box. Open the properties window (f4), click on the 'data' tab, and try adding this depending on what the rowsource is: If yo...

using DLookUp with a particular column in a combo box (I'm baffled
I have a form with an address combo box, when I select an address, I want another text box ‘From_PostCode’ to update the corresponding postcode from one of the columns on the combo box, but when I use the combo, I just get, #name? appear in the ‘From_PostCode’ textbox This is my code on the [From_PostCode] field set on the ControlSource property =DLookUp(" [PostCode] ","tbl_Street_Names","[StreetNameID]"=Forms!frm_Get_Rounds!FromGetRound.Column(3)) What am I doing wrong? Suggestions: The equal sign needs to be inside the quotes in the 3rd argument, and...

How to split up bulk text??????
Hi everyone, i'm really stuck with this one.... I have recently been charged with exporting data from my companies ACT! database and putting into excel ready to go into our new CRM package. I used an ACT! exporter that has left me a spreadsheet with data that I cant use yet. The notes for a particular contact are not split up into different cells as they should be, rather they are all put into one cell with the dates in as such- 23/11/2000 quick brown fox jumped over the blah blah 24/11/2004 quick brown fox jumped over the blah blah 26/04/2005 quick brown fox jumped over the blah blah...

Prompt to select from a list in another workbook
While creating a new service job, I would like users to have a list of jobs to select from for input into the service registry. The job list resides in another workbook. Is it possible to prompt for an input in VBA selected from another sheet or workbook? -- Jim Try this : Sub Choose_from_List() ' myForm is your userform containing a list box to select the item ' myList is the list box zWorkbook = "My Other List.xls" ' being the file containing the list zListSheet = "My List Sheet" ' being the sheet on which the ...

matching unequal text fields
I want to find records that contain disparent records with data in comparable fields like this: Data in Table 1 = BRG, ROLLER, 6020, FLANDERS, ER53 Data in Table 2 = BRG, ROLLER, 6020, FLANDER, ER53, 6.22X5.11, OD 5" Notes: the data layout is not standard for all records (i.e. the commas, naming convention are not universal, so we can't just strip-out the data). I'm not sure what you want to compare between the two fields? Which text from Table 1 is to match which text in Table 2? Show specific examples, please, and provide table and field names so that we can ta...

Text field vs. Number field
I have the following code running properly when used on text fields. It fails when I sub a number field. I sub Group in my strWhere statement with GroupID and it fails. Can anyone help me with the correct syntax? Private Sub cmdOK_Click() On Error GoTo Err_cmdOK_Click Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim strSQL As String, strWhere As String Dim i As Integer Set db = CurrentDb '*** create the query based on the information on the form strSQL = "SELECT tblProduct.* tblProduct " strWhere = "Where Group IN( " For i = 0 To lstClass.ListCount - 1 ...

How to automatically populate a cell?
Is there a way to automatically populate a cell with the same data that is entered into a different cell? Say for example I have a 20 column wide spreadsheet. When I enter data into the cell at row 1, column 'A', I want that data to automatically be entered into the cell at row 1, column 'T'. Can this be done? Can I link entire columns? As for your specific request, go to T1 enter"=" and click "A1". This way upon entering a data into A1, it will be automatically entered to T1 as well. If you want to repeat it for other rows in column T, drag the T1...

Print preview in dialog window, Help!
Hello All, I've got problem with print preview in MFC Dialog based application. I heard, that i can use CView class to print preview, not only in doc/view programs. I'm drawing on Printer Device Content and i would make print preview using CView class. I've created my own class based on CView class CsingleView : public CView { }; And I add new template in InitInstance CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CsingleDoc), RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CsingleView)); theApp.AddDocTemplate(pDocTemplate); Now,...

convert number to word (text)
I WANT TO CONVERT NUMBER TO WORD EXAMPAL 1005 CONVERT TO ONE THOUSNAD FIV Hi, You could do this by downloading ASAP Utilities and use Numbers -> Spell Numbers or amounts. http://www.asap-utilities.com/ Regards, A -- Please rate my response if you found it helpful. Thanks. "ROHIT" wrote: > I WANT TO CONVERT NUMBER TO WORD > EXAMPAL 1005 CONVERT TO ONE THOUSNAD FIV Rohit, have a look here, http://www.xldynamic.com/source/xld.xlFAQ0004.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can bene...

Copied text goes wacky in new template
I just set up a new template for a client. When they copy a free floating text box from an old presentation, they're getting some wacky formatting, mainly most of the text turns from Arial left aligned into Helvetica center aligned bold (the anchored text boxes are fine). Will they have to manually reformat all the free floating text boxes? We're both on PPT 2007. Thanks Jeri Does it happen no matter what paste option they use? -- James Orlando (Goofy says "Hey"), Florida "ppt diva" <jerit@discussions.microsoft.com> wrote in message ne...

Text flow from 1 section to another
Hi! I am working on template that has 2 sections. Text should automaticaly flow from page 1 (section1) to second page (section2). When I paste (or write) text, section 1 is continued untill end of text. Is there a way to "fix" sectioning - there is always section 1 on page 1 and section 2 on page 2 that continues over remaining pages (if there are any, depends on amount of text). Thanks, b. No you cannot do that. That is not how sections work. My guess is that you are using section breaks for a letterhead that has a different first page setting. Don't do ...

Removal of text reflection in title placeholder in Powerpoint 2007
Hi Folks, In regard to a previous question about text shadow, which is not the issue, I'm experiencing a problem with text reflection in the title placeholder on the slide master and throughout my presentation. When I check shadow effects for reflection, the dialogue box shows that there is no reflection, which is the only option highlighted. By the way, this issue only happens when I change design theme for a presentation and only when the "trek" theme (yellow background) is chosen. This does doesn't happen when other design themes are chosen to replace an...

Query based on Check Box
I have a query that uses multiple criteria entered into a form. The user is able to search using any of a number of fields to find records from a table. I have the following example expression for numerous fields in the criteria of the query; Criteria: Like [Forms]![search enquiries]![Quoted By] & "*" or: Is Null This works fine but i now want it to return records based on if some checkboxes are ticked as well. What would be the criteria in the query for the fields with checkboxes, to allow this to work? Thanks in advance Checkboxe...

How to get combo box with list and option for new
I'd like to set up a combo box to populate with the values from a table of shipment numbers and to give the option of adding a new shipment where if "new" is selected it will run code to get the next available shipment number (that I already wrote). This would be similar to setting the shipment_number to autonumber, but I want it to be safe from accidentally skipping numbers and I want it to explicitly say "new". Any ideas? Thank you. OK, the previous post "Update Combo Box" actually answered this, but I'd still like to know in which...

Forms
Hello. I am using MS Access 2007. I have a form that is linked to a query. I am trying to give the user the option of leaving some text boxes blank if they do not have the infomation. What formula do i use in the query? Thanks -- fa On Tue, 27 Apr 2010 11:58:02 -0700, fa <fa@discussions.microsoft.com> wrote: >Hello. I am using MS Access 2007. I have a form that is linked to a query. I >am trying to give the user the option of leaving some text boxes blank if >they do not have the infomation. What formula do i use in the query? > >Thanks Add a criter...

selecting every tenth row in excel
Hi, Does anyone know of a easy way of displaying every tenth row only in an excel worksheet? cheers. Steve. Find a blank column in the table in the first cell, type in the following formula =if(cell above =10,1,cell above +1) Copy this formula to the bottom of the table. Then copy and pastespecial>values on the same column to get rid of the formulae. Use a filter to get the 10th row by selecting the 10's in the same column. "steve" wrote: > Hi, > > Does anyone know of a easy way of displaying every tenth > row only in an excel worksheet? > > cheers. ...