VB 6.0 Calendar Control With Access Database
Ok, I'm most certain I'm not the only one who has been in this boat!
Calendar Control for VB6. Quite the nice tool. When you click on it, it passes the value of the date you clicked on to the "Value" property. Spiffy...
Now here's my dilema. I'm working on a scheduling application. My form is frm2Schedule, my ado Control is adoSched, my Calendar Control is MSched, I have text fields bound to my database for both the date, and the various time slots of this schedule application. My goal is to have the Calendar Control perform a few things:
1. When a date is clicked on in the calendar control, the function will begin a search query.
2. If this query fails (date not currently found in database), the function will call another function to create a new record, and the date for the record will match MSched.Value.
3. If this query succeeds (a record is found with that date), the function will call up this record.
Below is the start of my code. I'm familiar with VB, but this is my first time using the calendar control. Does anyone have any helpful advice to tackle this problem. I think I need to put an IF in here, but my IF failed.
Private Sub MSched_Click()
Dim nSearch As String
nSearch = MSched.Value
frm2Schedule.adoSched.Recordset.Find ("SDate =" & nSearch)
'I tried an IF statement here, but when I tested it, it failed.
'The messagebox I used to catch it never displayed.
Any help would be greatly appreciated.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Creating A Calendar From An Access Database
Hello, I have a question I was hoping I could get some help on.
We have several small access databases where I work, and I am working on one wherer we have the plane flights for the week listed in a query. I need to take this flight listing and create a calendar that will list where flights are going each day, and when pilots have the day off.
First Question: Will VBA and access do this or do I need a full version of VB?
Second Question: Can anyone help? I've looked around for a few days now and haven't found any similar calendar scenarios. Is this possible, or would I be better of using something else? Any help would be greatly appreciated.
Linking Calendar Control To Database
I have a form that uses the Microsoft Calendar Control. I want that control to be able to be able to access a Access database and display items from that database in their corresponding places on the calendar.
Is this possible? What sort of project do I create? Active X?
Thanks in advance
Access - Using VB To Control Popup Of Calendar
I'm trying to use a calendar in Access 2003 to enter data in data fields.
I found a site that showed how to write the code so it will popup when you click on the date field and then disappear when you select the date from the calendar.
I got it working but I want to be able to access that same calendar for other date fields on the form.
So I used a variable call 'originator' to pass the originators name to the variable.
Only thing is...now it doesn't work. I get a type mismatch error and I don't know why. It's exactly the same as the example I found(obviously with my names substituted in).
Please help. (dob is the field I want the date to go into and Calendar6 is the name of the calendar I'm using.) Here's my code:
Option Compare Database
Dim originator As ComboBox
Private Sub dob_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Set originator = dob
Calendar6.Visible = True
If Not IsNull(originator) Then
Calendar6.Value = originator.Value
Calendar6.Value = Date
Private Sub Calendar6_Click()
originator.Value = Calendar6.Value
Calendar6.Visible = False
Set originator = Nothing
Access Date + Calendar Control
The access date when i want dd/mm/yy is weird!
it shows 24/4/01 as 4/1/24 how do i fix this?
So it's show properly?
Also with the claendar control or dt picker how do i get it to set a value into a db? when i date is clicked on?
Access & Calendar ActiveX Control
I am creating an Access database and I want to add a Calendar control to ensure users pick a valid date. In my form I click on 'More Controls...' in the toolbox. I have a long list available and choose CoyoteCalendar2.Calendar and this adds the functionality I need.
However, I am a little worried that when I move this database to another users computer the ActiveX control may not be on their machine. Is this correct and if so how would I get the control onto their computer?
I don't even know how the Coyote Control got onto my machine - it may have been while installing another program e.g. Visual Studio.
Any help is appreciated.
Access 2000 Calendar Control
I am fairly new to Access, I am trying to add a calendar control to an existing database. using the calandar control i would like to be able to select dates and show all events listed for that date. is this possible?? if so please help.
Calendar Control In An Access Form
I have a calendar control (class MSCAL.Calendar.7 if that means anything) in an Access 2003 form. (It's actually in an Access 2000 file format.)
I have an event
Private Sub Calendar8_AfterUpdate()
Me.Text60.Value = Me.Calendar8.Value
which does not always fire.
If I open the form in normal view the event does not fire.
If I open the form in normal view, switch to design view, open the form in normal view, the event fires.
Has anyone seen this type of behavior?
Put your PC to good work at vbCity at world community grid and join Team vbCity.
2,669,763 3,325,308 points and ranked 1,195 1,149 as of March 8 May 23, 2008!
Calendar Control And Simple Access Query
For some reason this won't work:
sql = "select * from Customers where Date_PS=" & Calendar1.Value
I am not sure why. The Date_PS field is a date (short date format). I have this query running on the Click event and when the value of the click is present in the access table, it won't be selected. I haven't gotten mismatch errors and have tried a bunch of formatting things to try to get a match, but at this point I am at a loss.
Thanks for your help...
Microsoft Access 2000, SQL And Calendar Control
I'm doing a little project with MS Access 2000 and I have been stucked with the following problem a few days:
I have a SQL query:
SELECT Sum(Table.Column) As Total
FROM Table WHERE Table.Date = [Forms]![MyForm]![ActiveXCtl].[Value] (I've also tried many other SQL-queries)
On the form I have a Calendar Control and its name is ActiveXCtl, I have put the following function call to the ActiveXCtl's Click-method: Form_MyForm.Total.Requery
I also have that query on the form as edit box (Name: Total).
Now when I click on a certain date on the calendar control, I would like to see query results for that date, but nothing happens.
Can anyone help me with this one?
HOWTO: Add Appointment To Outlook Calendar, Data Source Is From Access Database
I have a database using Access as the front-end and SQL Server as the backend.
In the database, there are these fields: Next appointment date, next appointment time, and client's name.
Base on these fields, I want to add an appointment to Outlook calendar using VBA.
I don't know if this is possible because from what I've seen so far, people is going the other way around (export Outlook data to access), not export access data to Outlook.
Can somebody help me?
Problems Linking Outlook Calendar To Microsoft Calendar Control In Vb.
For a while now I've been trying to find a way to link my outlook calendar to the microsoft calendar control in visual basic. When I click on the calendar in my program, I want it to show the appointment subject in a text box and the appointment body in a Richtext box. I'd appreciate any help?
Add Pix To My Custom Calendar (not A Calendar Control)
I'm hoping maybe someone can help me. I found this piece of code on the web (don't remember where) and I've made many adjustments to it. The only problem I'm having is I can't seem to add pictures to a date. For example, when the user double clicks on a date to add a text reminder, I would like him to also add a picture to that date. I would appreciate it if any of you could lend some help. Thanx.
This is a simplified version of my calendar. In the calendar in the attached zip file, I have changed the way the user changes the year (it is just a simple command button) and have deleted certain parts of the code that would have just cluttered things up for someone tryin to understand the code.
Edited by - Marce22 on 12/9/2003 1:24:33 PM
Database Access Control
hi i have a vb msaccess program . My question is , how does one make the database access restricted to exclusively the program . as you know a .mdb file can be opened by just double clicking if you have msaccess . how can this be prevented . would changing the extension help ? and in that case would the program and access itself recognise the changed extension as a database ?
Access Database Control
my question is posted in a web page below, because i needed to add a picture to it. please follow the link
Access Database Control
my question is posted in a web page below, because i needed to add a picture to it. please follow the link
"who says you need wings to Phly"
Access Database And MSHFlexGrid Control
I am currently working on a VERY important project for my company in London.
I am developing an application that uses Access and Visual Basic to implement a fully functional application for managing cars, car parts, customers, employees, staff loggings etc.
I have one problem regarding my Access Database and my MSHFlexGrid Control.
I have attached a very small ZIP file containing two screenshots of the application. The problem is that I have three fields in a access database table that are of the type SINGLE and the Decimal Places property is set to 2. The database clearly handles and shows the data of these fields as e.g. "15.26", "25.5" etc.
The problem is that the MSHFlexGrid for some reasons shows the figures as whole. This is incorrect. I am using a recordset and then assigning the datasource of the FlexGrid to the recordset.
I have checked the code many times and all I do is assign the recordset. For some reason, the MSHFlexHrid is interpreting the decimals places as whole numbers. This is a BIG PROBLEM and my database application would be a failure if this is to happen. I have EVEN tried setting the fields to TEXT. Still the MSHFlexGrid is taking decimal numbers as WHOLE NUMBERS.
Control Codes In Access Database
In database the values for only few records r stored improperly like a rectangle symbol is inserted in some fields so when i try to edit the field value the database closes i just want to remove such records
Using ActiveX Control With An Access Database
Ok, I am trying to make an ActiveX control that uses an access database. ADO... I want to be able to add only to the access database and I can not figure out for the life of me why it is not working. If I leave the ADO control visible, I can browse through the database, but when I make the .visible property false, it turns the form into big red lines all over. And, when you use the adodc1.addnew function, does it clear the boxes that are bound to the dbase areas and then allow you to type in the new ones or does it set whatever is in the boxes at the time as the new value? Thanks!
Accessing An Access Database W/ Dao Control
I made a front end for an access music database in vb6. I have a dbgrid box that i want to display song titles for the selected cd, but i keep getting all the songs for all the cd's. what do i need to do to correct this?
Sort Access Database Through Control Array
Ive got a control array set up, that is linked to an Access database with a data control.
Its primary function is to update the yes/no field called "Collected" within Access.
However, I also want it to assign a value to the field "Order Code" and then sort the database.
Ive tried putting in an SQL sort after the database is updated, but it doesn't seem to work.
The code is below, and the sort code is coloured in red:
Private Sub cmdStock_Click(Index As Integer)
If vacant = True Then
For i = 2 To Index
Data1.Recordset("Collected") = -1
Data1.Recordset("Order Code") = Null
Data1.RecordSource = "SELECT * From Stock Table ORDER BY Shelf Number;"
ElseIf occupied = True Then
For i = 2 To Index
Data1.Recordset("Collected") = 0
Data1.Recordset("Order Code") = txtOrderCode.Text
Data1.RecordSource = "SELECT * From Stock Table ORDER BY Shelf Number;"
Any ideas how I can get it to sort the database by the field "Shelf Number" after it has been updated?
Thanks in advance.
Getting Picture From Image Control To Access Database ??
I have a problems for getting a pictuer into the Image Control :
1. I want to select the pictuer that I want and then display it into the Image Control using the CommonDialog Compenent.
2. Then taking this pictuer from the Image Control and add it to an Access Database Record.
How Do I do That .... ??
I've made this code but it wont work for me
Dim FileName As String
Dialog.Filter = "JPG Files|*.jpg|BMP Images|*.bmp|GIF Images|*.gif"
On Error Resume Next
On Error Resume Next
Dialog.CancelError = True
FileName = Dialog.FileName
Image1.Picture = LoadPicture(FileName)
Any Idea ??
Many Thanks in advace.
Open MS Access Locked Database With ADO Control
I have a ado control and am trying to open a MS Access database that is password protected. I have tried to use the Password funtion in the ADO properties, but it does not allow me to unlock my database..
Is there another way to do this with a control?
User Control In Access Database File ?
Can i add a user control in Access database file (mdb)?
I want to make o form in an mdb file and i want to add my button.
Hope You can help me.
Cascading Listboxes With Ms Access Database And Ado Control
Was wondering if I could get some help here.
I have a multi table database.
I would like to populate 3 listboxes with data from 2 of the tables and then move the ADO control depending on where the user selects items in the listboxes.
I can get the first listbox to populate just fine from the first table called "tblBOOK"
It has 2 fields, Book_ID and Book_Title. The first field has 66 entries and the 2nd field has unique names for each of those id numbers.
The 2nd table I am concerned about is called tblQUOTE and has Book_ID, Chapter, Verse, Quote.
The problem is, that Book_ID in tblQUOTE has multipe 1's 2's and 3's etc depending on its corrisponding Book_ID field in tblBOOK.
tblQUOTE is grouped with all the book titles that go with the number 1 in Book_ID would be considered the Book_Title in tblBOOK.
So lets say tblBOOK has a Book_ID of 1 and a Book_Title of Genesis.
so in tblQuote I would like all the 1's in tblQUOTE.Book_ID to relate to Genesis which is in tblBOOK.
The next listbox then would be set to use the Chapter field in tblQUOTE and be set to the number 1 grouped by the Book_ID field and the 3rd list box would use the Verse field and also be set to the number 1 grouped by the Chapter field.
What I dont want to see in the 2nd and 3rd listboxes are multiple 1's, 2's and 3's etc.
It would need to group the 2nd list box with only 1 representation of each chapter in the book Genesis. And the 3rd listbox would be only 1 representation of each verse in chapter 1 of book Genesis.
I then want the ado control to move to the correct area and put in a text box from the proper location in the database the contese of field Quote from tblQUOTE.
So, what I am looking for is subset's I guess but taking out the repeats.
Any ideas if this is even possible? And if so, any code suggestions.
What I have tried so far is using SQL queries but I cant seem to get the 2nd and 3rd boxes to populate without seeing multiple 1's, 2's etc.
If you havent guessed so far, yes its a bible reading program with a access database.
Any assistance would be appricated.
Access A Passworded Database Using A Data Control, How??
I now have the problem of trying to access an Access database with a password using the data control in visual basic 6. How do you send the password parameter using the data control?
Im using Data1.DatabaseName="c:db.mdb" but it cannot access a passworded database, can someone tell me the code to pass the password to allow this to work?
What's the best way to design a appointment calendar database. Should I just create a table to store all of the appointment entries or is there a better method?? By storing the appointments only, would it then be impossible to run searches for the next free time slot?? Thanks everyone!
I need to make a database to hold a years worth of calendar entries, and then read specific dates by querying them from VBScript. Help... How would I, rather, how should i go about doing this?
"**** the torpedoes, full speed ahead!!!"
Calendar, Database Or Other?
I`m creating a calendar as well as a address book for my project. now what i can`t decide is whether or not i should use a database with access for my calendar. It would make loading and saving easier since i am uncompfertable wiht many of hte other ways i know how. I`m just curious if anyone forsees in problems with it
i was going to use the date feild as the primary key,
the date would be changed into my own format thought.. my original thought was calendar1.day + (calendar1.month*100) so
eg. jan. 1 whoudl be 101
and so on...
so my question is, is their a problem with doing this i dont` see, or does anyone know an easier way to change the date into an exseptable format?
Calendar Control Or Date Picker Control
Visual Basic 6 w/MS Excel.
Are there any calendar controls or date picker controls that can be used with Excel? Ideally, I would like a calendar to come up on the screen so the user can pick a specific date, then enter into a specified cell.
Connecting VB5 Data Control To Access 2002 Database
i'm work on vb 5 and am presently involved in a database project with access 2002 as backend. i have already got the front end made in vb5. But when ever i try to connect vb to the database thru data control i get an error message. request advice/help regarding this.
Can't Bind Data Control To Access 2002 Database
I have a database I created using Access 2002. I made a blank project in VB6, added the standard Data control and I set the Database name property to the path of my database. I then tried to set the RecordSource property to the table in my database and I got an "Unrecognized database format" error. So I checked that I had the latest version of the Msjet40.dll (version 4.0.8618.0 which corresponds to Windows XP SP2 and Security Bulletin MS04-014 (according to Microsoft's site)). What else am I missing? I'm running XP pro with service pack 2 installed.
Refresh Listview Control Contents From Access Database?
The listview control had load all the record from database.....and i update one record in the database......so in the form...i want the listview to display updated record in the database...i had test the listview.refresh method.....it just repaint the listview control and not load the updated data....izzit i need to open a new adodb connection and load the updated record to the listview again...
is there any other ways to do so?
I Need To Get Date Value From MonthView Control And Use It To Search Access Database
I am building a little app which allows user to click on monthview date and display study details for half hour time slots for the day chosen in a flexgrid in bottom half of form.
I don't know much about SQL. So far I can get the app to display items with a value of today's date but I can't get it to pick up the date clicked and use that.
I need help fairly urgently or I will have major egg on face!
Database Calendar Form
Does anyone know of an easy way to create a form that reads the dates from a database and plugs events into a calendar? Is there a control out there that I can use? Does anyone know of any products that can handle this?
Database Calendar Problems
Well i tried and tried, to make this calendar with a database work, but its really giving me the ****s. Can anyone figure out what the error is? Would be greatly appreciated!! VB6 project attached in zip file. ~1.3mb
It says "compile error : User-define type not defined" ?
Ive fixed that but how do i get the date format in the module 'dateandtimeval' to be DD/MM/YYYY ?
How To Open MS Access Database Which Are Password Protected Using MS ADODC Control
Hello to all of u once again...
Now i am in BIG trouble... i hav one more week to complete this project and i cant find a method to connect MS Access Database(a password protected database) to MS ADODC Control.
I hav the codes to conncect Password Protected database with DAO 3.6, but not with ADODC Control.
So can anyone of u help me by givin the steps for how to solve my problem. It wud do a great help for me.
Thanking you in advance...
Add Record Problem, Access Database, Vb 6, Data Control, Error 3426
I have the following code under a command button that should add a new record to the database. When i run the program it give a 'Run time error 3426 - the action was canceled by an associated object'. My help file is missing for this error so im not sure where the coding has gone wrong.
Private Sub CmdAddApp_Click()
Dim Appointments As Recordset
Dim ClientID As Integer
Dim Stylist As String
Dim Time As String
Dim Day As String
LstClientID.Text = TxtClientIDVF.Text
TxtStylistVT.Text = TxtStylistVF.Text
TxtTimeVT.Text = TxtTimeVF.Text
TxtDayVT.Text = TxtDayVF.Text
TxtDateVT.Text = TxtDateVF.Text
ClientID = TxtClientIDVF.Text
Stylist = TxtStylistVF.Text
Time = TxtTimeVF.Text
Day = TxtDayVF.Text
Date = TxtDateVF.Text
Appointments![Client ID] = ClientID
Appointments![Stylist] = Stylist
Appointments![Time] = Time
Appointments![Day] = Day
Appointments![Date] = Date
Help! -- Put Calendar In Access
Could anybody helps me?
How to insert a calendar in Access, so that I can click the calandar icon and choose the date I want to input into the database instead of typing date like 09/03/2004 in a blank.
Thanks in adv!!!
I am trying to build a form in MSAccess where clicking on a date in the activex calendar produces a list
of records with that date. When I click on the date I get all the records not just the date selected. I am a beginner who really needs some guidance on this. Thanks
I am using access 2000.
I want to use a calendar but I am unsure how, I cannot find much in the help file.
When I click a date I want to open form1 and I want the value of the calendar control (the date) that I clicked on to be put into a textbox on form1.
How would I go about doing this?? I am not sure of the code to use?
I know this is asking a lot but has anyone any experience with using calendar controls??
I would like to use one in an access database but I dont have a clue how to do it. I want to be able to click on a date and then for a form to open. How would I do that?
hi, i add a calendar control to my worksheet (EXCEL) and i wonder how can i define that when i choose a cell it pops up and when i choose a specific date it insert it to the cell ???
When I insert a calendar control in an Access 2000 form, the calendar appears all the time. How do I make this appear only when I click on the arrow button (just like when I'm setting reminder in Outlook 2000)?
Please advise. Thanks.
Calendar Control 11.0
Hey all -
Rookie question by the rookie:
I have created a form and placed a calendar on it using Calendar Control 11.0 (I'm running Excel 2003). My question... by default the calendar does not automatically show the appropriate month/year based on today's date. How can I change this?
I am familiar with MONTH, YEAR, and TODAY functions, so I'm sure I can do that part of the code. What I am not familiar with, however, is how to change the month and year on the Calendar Control, as it is not a form I've created, but rather an OCX file in Program Files/Office...
VB6 Calendar Control
My application has a calendar control that works just fine on the PC from which it was written. On the Windows SBS Server it works fine also. Unfortunately it doesn't work properly on the 2 other PC's I've loaded it on. The font is so small on the days that they aren't readeable. It was designed for week starting on Monday but on the 2 PC's it starts on Saturday and The month at the top of the control is unreadable. Any ideas???
Can the monthview control give me the dates of a specific week when clicking on the week number????
what happens when a week is within 2 different months??