473,387 Members | 1,574 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.

How to run a form and push a button automatically?

4
hi dear all

question for "Run a form and push a button automatically"

I have a form With name "ReportingDateRange"

this form save 2 text for reporting daterange with start date and finish date .... i have a button on this form with name "SAVE" in event of this button i said

Private Sub Preview_Click()

Save Me.Name 'Call function code

End Sub

In Public function i have too bellow code :

Public Function Save(ByVal strfrm As String)
Dim frm As Form

Set frm = Forms(strfrm)
If IsNull(frm![Beginning Entry Date]) Or IsNull(frm![Ending Entry Date]) Then

MsgBox "You must enter both beginning and ending dates."

DoCmd.GoToControl "Beginning Entry Date"
Else
If [frm]![Beginning Entry Date] > frm![Ending Entry Date] Then
MsgBox "Please Retype Finish Date : Must be Greater or Equal Than Current Date"
DoCmd.GoToControl "Beginning Entry Date"
Else
frm.Visible = False
End If
End If
End Function

this is work fine but in first open database user must save atleast one more time to open this "Reportdaterange" form and push this SAVE button


now Question : after database run in autoexec i have to run "Reportdaterange" form for user to push save for first time
i want to open form in run database and **** run save automatically and close form*******
Dec 3 '10 #1
0 1112

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bala murugan via .NET 247 | last post by:
(Type your message here) -------------------------------- From: bala murugan hi, i am using DataGrid in my project , so, i would like to change the DataGrid Edit Button Properities to Push...
1
by: Mirco | last post by:
I must make a aspx page that make these single steps: 1. when I open it is green 2. when I click a button it is blue 3. when I click the same button it is red alternate 2 and 3 I have...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
2
by: HankC | last post by:
I'd like to pass a variable to my webform1.aspx, place it in a textbox on the page and push a button to execute code when the variable is present... e.g. ...
2
by: Chris Sharman | last post by:
I found a use for a (push) button the other day - having never wanted it before. I used button rather than input type=button, because I wanted to use an image for it. The html4 spec doesn't say...
4
by: shir | last post by:
Hi.. I'm new in programming microcontroller in c. And I was given an assignment to write a simple program to turn 'ON' and "OFF' the LED by pressing push buttons. The microcontroller i'm using is...
4
by: Marcpp | last post by:
Hi I need to call a widget from a button in WXPYTHON. I've tried to this from a function like this, but when push the button, the program opens a window and do error. Any idea? ...... def...
4
by: John | last post by:
I have a form with 5 buttons, each of them executing code and showing a different report. I would like to add a 6th button 'total' that opens all 5 reports in a row (next report opens when other is...
2
by: Magnus Warker | last post by:
Hi, can I associate the pressing of "enter" with one of the forms submit buttons? Thanks Magnus
18
by: angi35 | last post by:
I've been puzzling over something, and hopefully someone here can help me figure it out. In Access 2000, I have two forms... let's call them formA and formB. Users enter data first into formA. ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.