Calendar, Code And Determining Value

May 8, 2006

Working on a calendar project. I've found some helpful code, but I don't want to use someone elses whole project. So while trying to understand how all this works I'm running into some problems. I am using to start one of the simpliest codes I have found.
```````````````````````````````
Private Function filldates()

Dim curday As Variant, curbox As Integer, Tbox As Variant

curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
For curbox = 0 To 36 'need to loop thru 36 textboxes
Me("D" & curbox) = Day(curday)
Me("D" & curbox).Visible = False
Me("T" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("D" & curbox).Visible = True
If Month(curday) = Month(Me!FirstDate) Then Me("T" & curbox).Visible = True
curday = curday + 1 'nextday

Next curbox

End Function
```````````````````````````````````````
'Note' I have added the "T" box for additional info.....

My problem is this...... I have 36 boxes that can contain variable dates. What I want to do is on the "Click" or "DoubleClick" event of say...... box "T14" I need to determine what date is the current value of "T14" and then I can open the other form to that date. This other form would be details of whatever date is currently in "T14"
Does that make sense???? Hope so! :)
Any thoughts??

Thanks
Curtis

View Replies


ADVERTISEMENT

Problem With Code On OCX Calendar

Sep 15, 2005

I've copied the code for an OCX Calendar on one of my forms to another form used for the exact same purpose. Everything is exactly the same and I keep getting the following error every time I click on the calendar:

RT Error 91:"Object variable or With block variable not set"

Can anyone tell me what I've done wrong? Thanks!

KellyJo

View 1 Replies View Related

Determining Tables Etc. Used By .adp

Sep 7, 2005

I have an .adp file but I'm not sure which tables/mdb file(s) are used. Any easy way to determine this? I'm backward engineering because someone got fired. Any help would be appreciated.

View 1 Replies View Related

Determining Focus

Jan 4, 2007

Is it possible to use the "On Lost Focus" event to determine which control now has focus?

View 6 Replies View Related

Determining Appropriate Const MaxRecords

Jun 7, 2005

I have an ASP / Access storefront, connecting through JET OLE, which is frequently crashing with '800040005 System Resource Exceeded'. The whole ODBC/Jet service must be restarted by my host manually.

Usually this error indicates an unclosed rs.open. I have however triple checked all code and there are no unclosed loops.

I am examining the basic connection variables and wondering if perhaps as my database has grown over the last year, the following original 'out of the box' settings are no longer suitable, and causing this error.. in particular maybe the 'Const MaxRecords' is no longer enough (or is too many?). How does one calculate what these Const settings should be?

Thanks for any help!

Code:Response.Buffer = TrueConst adEditAdd = 2Const adCmdText = 1Const adCmdTable = 2Const adOpenForwardOnly = 0Const adOpenKeyset = 1Const adOpenDynamic = 2Const adOpenStatic = 3Const adUseClient = 3Const adLockPessimistic = 2Const adLockOptimistic = 3Const maxRecords = 200

View 1 Replies View Related

Determining Computer Region/location

Jul 14, 2005

Anyone know of a way in Access/VB to determine what the region/location is set to on a user's computer? Need to determine whether to use commas or decimals as a monetary separator.

Thanks,

B

View 5 Replies View Related

Modules & VBA :: Determining New Month And Run A Procedure

Aug 6, 2013

I've been stumped for the past couple of days trying to discern a method for a form to determine that it's a new month and run a procedure and only run it on month change.

My initial thought is:

Open recordset
move to the last record
compare the month in a date field within the last record to the current month
and run the procedure if the month is different.

I can't get this to work however and I'm not sure what I'm doing wrong. To be honest I typically fumble my way through VBA when it comes to opening recordsets. Here's what I got:

Code:
Dim rs As DAO.Recordset
Dim db as CurrentDB
Dim strSQL As String
Set rs = CurrentDB.OpenRecordset("FlightLog")
strSQL = SELECT [txtDate] FROM [FlightLog]

[Code] ....

txtReqNumb and txtFltNumb are the values to be reset at the beginning of each month.

Am I on the right track and just have the VBA wrong?

View 4 Replies View Related

Determining A Forms Location (when Form Is Not Current)

May 31, 2005

Greetings. :)

I am trying to position opened forms so that they are cascaded on the screen. I have discovered the movesize action (for the DoCmd) and Move property of a form (for Acc 2002/2003). However, if the application is opened up on different monitors (e.g.; 17" or 19"), the relative location of the opened form is not the same (i.e.; on the bigger monitor the opened form is too far over to the right and too high).

What I want to do is ...

When the subsequent (or second) form is opened up I would like to find the absolute location of the first form (always centered). This way I will be able to reposition the second and third forms relative to the first form.

Is this possible?

I'm having trouble referencing the first form from within the second form. The first form is still open, but they are not linked forms (not parent/child). I've tried:

forms("firstformname").left
forms("firstformname").top

but this does not work.

I've gone to online help and I've looked around in the newsgroups. But can't find any info. Anybody out there will suggestions?

Regards,
SueB :confused:

View 1 Replies View Related

General :: Determining The Values In One List Based On Another

Jun 27, 2012

I have a table with a few Listbox options. I want one of the columns' values to be determined by the value chosen in another field. How do I do this?

Example: In column A I choose value ABC from the dropdown. I want column B to now offer values in that list of DEF, GHI, JKL. If I chose XYZ in column A instead, I'd want the column B list to show MNO, PQR, STU. Etc.

View 6 Replies View Related

Modules & VBA :: Determining If Another Form Is Loaded In Add Mode

Feb 2, 2014

I have two related forms.One is a list of transactions and the other is used for both inquiry and adding new transactions. If the Inquiry form is just sitting in Add mode and the List form tries to open it in Edit mode, it won't open. Is there a way I can tell from the List form that the Inquiry form is in Add mode and either close it or tell the operator about the issue?

View 1 Replies View Related

Urgent: Determining SQL Server User Name & Group From Access

Oct 17, 2005

I have designed an application in Access with an SQL backend.

How do I determine the user logged into SQL from within my Access application.

Specifically what stored procedures can i use to determine
1. The user name
2. The user's group(s)

of the currently logged-in user.

I would appreciate any other techniques for solving this problem

Thanks.

Peter.
Nigeria

View 1 Replies View Related

Modules & VBA :: Determining Number Of Users Of Split Database

Nov 1, 2013

We have a database that is split. Every user has their own front end (installed via a .bat file so that the users always have a local copy of the most recent version), linked to a shared back end on a server. This seems stable and functional for us so far.

However, because our users are geographically separated, I don't actually know how many folks are using the database. I know the folks who contact me, but everyone in our company could use it if they wanted to.

For requesting funding, guiding future development, etc., I need to get some metrics:

Total number of unique users
Avg uses per day

Total number of simultaneous users (daily, weekly, and monthly maxes and mins)

What is the best way to get this info? Write user info and a timestamp to a table each time a front end is launched? Are there tools for monitoring this sort of information?

View 3 Replies View Related

Determining Actual Running Time Of External Application In Access

May 3, 2014

I want to run an external application (a batch file) ... and want to run it by clicking on a command button on a form. That part is all fine, using the Shell command. I can determine the start time of the application (also fine with now() function) .. but want to find out how long the external application ran and log that "run time" into my database.

The part I don't know about is the .. really the ending time. How do I determine how long the application really ran for / ended ? I imagine I can use datepart to determine the difference in the start and end times. Or would I use a timer control. (but I cannot find the timer control in Access 2010).

View 3 Replies View Related

Please Review This Code, (simple Code) New With Codes

Feb 16, 2006

Works great, but when I hit the number "3", (3 times in row) it will let me into the form. I want it to not let me in IF I don't know the password.

Where did I go wrong?

Private Sub Form_Load()
Dim pw As Variant

If InputBox("What is the password?", "Password") = "1" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
If InputBox("What is the password?", "Password") = "2" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
End If
End If


End Sub

View 14 Replies View Related

Using Code To Unprotect And Protect Viewing Code

Jan 14, 2007

I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"

Is there a way to write code that will remove that Lock Project check and check it back on?

I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.

Thanks

SHADOW

View 6 Replies View Related

Calendar

Jul 22, 2006

Hy!

I've putted on calendar on an database but by example when I press first of June how can I make it recognise which week day is it?

Thanks

View 1 Replies View Related

Calendar

Jan 2, 2007

Hi All!
I have Access Calendar on my form. I named it txttoday. Which code and where should I put the code in order when I open my form I want the date always be on todays date. I guess it should be on Open and something like txttoday = now()....

Please advice,
B

View 2 Replies View Related

Calendar

Mar 18, 2008

Using an activeX calendar. I have 2 questions.

1) Is it possible to have certain dates always highlighted in the calendar so the user can clearly see these dates. What I'm looking for specifically is to have each second thursday always highlighted with another color.

2) Using a seperate form and calendar than the one above, how would I go about using a calendar to search for old records (apply a query to it maybe, but how would I do that?) so that when I click on a date, the records for that specific date are opened.

I really appreciate any help that anyone can offer with either question. If you leave an answer in code, can you please clearly define what you named each item that I may need to replace, i.e. Calendar, Date, etc., because I'm not incredibly familar with using code.

Thanks in advance for the help, I will be able to respond quickly if you have any questions or if I didn't explain anything clearly.

View 10 Replies View Related

Calendar

Jan 2, 2007

Hi All!
I have Access Calendar on my form. I named it txttoday. Which code and where should I put the code in order when I open my form I want the date always be on todays date. I guess it should be on Open and something like txttoday = now()....

Please advice,
B

View 2 Replies View Related

Calendar

Mar 10, 2005

I am trying to use a calendar to fill the date box on a simple form, I have used the examples from various threads on here but I cannot get the calendar to pop up.

The error message I get is

Run Time Error 2110
Microsoft Access cant move the focus to the control activeXCt161

Any thoughts on how I can fix the problem?

View 1 Replies View Related

Pop Up Calendar - How?

Sep 28, 2005

Hello,

I have seen pop up calendars in use in other databases and wondered if it was possible to put one into my current DB. (The standard little Microsoft style one).

Rather than using a direct entry date field in my form how do I go about adding in a pop up calendar. Can this be done easily?

Thanks

View 2 Replies View Related

Calendar Help

Feb 8, 2006

i cant hide the calendar when u open the form and i cant click a date without an error appearing help please

View 6 Replies View Related

Calendar Help

Mar 17, 2006

Hi all.

I'm trying tosetup a pop up calendar in my Access Database for users to select start and finish dates of activities. I have a calendar from here: http://www.utteraccess.com/forums/showflat.php?Cat=&Board=codearchive&Number=413286

Here is my problem, When I run the database "Calender2000" it works fine. The calendar is displayed, but when I import the database (using get external data), and try running the calander, I get the following error:

"The expression you entered has a function name that Microsoft Office Access can't find.@."

I am fairly new to Access, and currently using Access 2007. Any help appreciated (I can follow instructions in Access 2003 format).

sugar05

View 2 Replies View Related

Calendar

Jun 7, 2006

I am getting myself into knots trying to solve this can anyone help:

I need a calender so that the user can book and check availability of courses for each date. ie course 1 has 5 places on this date, once one is booked then there should be 4 places left.

Does anyone know if there is a graphical form available which I can use for this function and serve the dual purpose of data entry?

View 1 Replies View Related

Calendar

Aug 27, 2006

Hi, I have find this calendar, wich is great for me as my ACCESS program is in italian and all calendars I have find gives me back date and month values in italian, this one I can set it either italian or english!!!
What I need is to make it visible on double clicking on the date on a form and once opened selecting the dae on the calendar it returns the value onto my date field on the form.
Thanks
Marco

View 1 Replies View Related

Calendar

Oct 31, 2005

I would like to create a text box that when it has focus a calendar pops up, allows the user to select a date and then disappears after a date is selected, leaving the date (mm/dd/yyyy) in the textbox. Anyone know where code may be available -- I am willing to pay for it? Thanks ...

View 5 Replies View Related







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