473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Returning information on form used as a dialog

I'm new at this stuff, so let me know if I am approaching this
incorrectly.

I have a form that allows the user to select a document that is in one
folder, and copy it into another folder. I would then like it to
rename that file based upon a name provided by the user.

So far, once the user clicks on the button to start this process, I
open a form which has its pop up and Modal properties set to true.

I would like the function which opened the form I am using for a dialog
box to wait for the user to enter the information before continuing on
with its process. (like you would expect a dialog box to do.)

Can someone explain how I would go about doing that? or is there some
dialog control that I should be using instead?

Thank you,

Jody Blau

Feb 7 '06 #1
5 1618
On 6 Feb 2006 18:42:30 -0800, "jodyblau" <jo******@gmail.com> wrote:
I'm new at this stuff, so let me know if I am approaching this
incorrectly.

I have a form that allows the user to select a document that is in one
folder, and copy it into another folder. I would then like it to
rename that file based upon a name provided by the user.

So far, once the user clicks on the button to start this process, I
open a form which has its pop up and Modal properties set to true.

I would like the function which opened the form I am using for a dialog
box to wait for the user to enter the information before continuing on
with its process. (like you would expect a dialog box to do.)

Can someone explain how I would go about doing that? or is there some
dialog control that I should be using instead?

Thank you,

Jody Blau


DoCmd.OpenForm "frmMyForm",,,,,acDialog
Wayne Gillespie
Gosford NSW Australia
Feb 7 '06 #2
I tried this, but it doesn't wait for the dialog to close before
continuing on with the code.

eg.,

private sub Add_Document()

DoCmd.OpenForm "Name_File_Dialog", , , acDialog
MsgBox "BOO"
end sub

I need the dialog box to return a vaule before the code continues to
execute, e.g., so the dialog box should pop up, the user should enter
info, and then close the dialog box, before I get MsgBox "Boo" to
execute.

Thanks,

Jody

Feb 7 '06 #3

You have to show it in a modal form. Not modeless.
aiaiai

-Pam

Feb 7 '06 #4
jodyblau wrote:
I tried this, but it doesn't wait for the dialog to close before
continuing on with the code.

eg.,

private sub Add_Document()

DoCmd.OpenForm "Name_File_Dialog", , , acDialog
MsgBox "BOO"
end sub

I need the dialog box to return a vaule before the code continues to
execute, e.g., so the dialog box should pop up, the user should enter
info, and then close the dialog box, before I get MsgBox "Boo" to
execute.

Thanks,

Jody

What you can do is 1) close the form if the person doesn't complete the
action or 2) make the form hidden if item selected.

DoCmd.OpenForm "Name_File_Dialog", , , acDialog
If IsLoaded("Name_File_Dialog") Then
'see function IsLoaded at http://groups.google.com
Me.Text0 = Forms!Name_File_Dialog!Text0
Docmd.close acForm ""Name_File_Dialog""
endif
MsgBox "BOO"
Feb 7 '06 #5
On 6 Feb 2006 20:11:49 -0800, "jodyblau" <jo******@gmail.com> wrote:
I tried this, but it doesn't wait for the dialog to close before
continuing on with the code.

eg.,

private sub Add_Document()

DoCmd.OpenForm "Name_File_Dialog", , , acDialog
MsgBox "BOO"
end sub

I need the dialog box to return a vaule before the code continues to
execute, e.g., so the dialog box should pop up, the user should enter
info, and then close the dialog box, before I get MsgBox "Boo" to
execute.

Thanks,

Jody


If the code above is a direct copy from your app, then you are using an
incorrect syntax. The WindowMode argument (acDialog) is the 6th argument of the
OpenForm action, there should be 5 commas between FormName and WindowMode (not
3).

DoCmd.OpenForm "Name_File_Dialog", , , , , acDialog
Wayne Gillespie
Gosford NSW Australia
Feb 7 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Pablo J Royo | last post by:
Hello: i have a function that reads a file as an argument and returns a reference to an object that contains some information obtained from the file: FData &ReadFile(string FilePath); But ,...
2
by: Gordon Airporte | last post by:
The dialogs in tkColorChooser, tkFileDialog, etc. return useful values from their creation somehow, so I can do stuff like this: filename = tkFileDialog.askopenfilename( master=self ) I would...
2
by: Mark Broadbent | last post by:
I know this has been discussed before, but rather than spend ages trawling through old threads I thought I would start a new *quick* Q&A thread. Q. What is the preferred method for returning data...
0
by: Yurai Núñez Rodríguez | last post by:
Hello!! I need to get Virtual Directory and Port information (which is shown/modified in the Installation Address dialog) to be used in a Custom Action during installation of a Web Application....
10
by: KeithRaginF | last post by:
Hello I am trying to return the contents of an Excel file. However, I don't want to just redirect the request to the Excel file since it does not reside in a location where that is appropriate. ...
14
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
1
by: Curious Trigger | last post by:
Hi there, programming with Visual Studio 2005 and ASP.NET 2.0 I want to open a modal dialog from Default.aspx. I searched the net and many newsgroups but I couldn't find any solution. First I...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.