Hi, everyone,
I got a problem in the C++ programming when reading data file. The codes are attached below. In the for loop, the data file can only be opened once. When j=2, it does not open the file. I don't understand why. Is there anyone can give me a hand? I've been struggling for a while...
Hi,
I have some date fileds on several forms and I want to pass the date from calendar control to them once any of them is in focus. The calendar will be created on a separate form. Date fileds are on several different forms. I hope once one click the date field and then pick the date from the...
Is there an event that we can use when Access is closing, like windows is saving settings after one hit turn off computer? I want to write out some infomation when Access is closing.
Thanks,
SwingXH
Type mismatch for
Dim MyDate1, MyDate2 As Date
MyError = Int(MyDate1- MyDate2) & Format(MyDate1 - MyDate2, " hh:nn")
I found this one helpful
MyErrorhh = DateDiff("h", MyDate1, MyDate2)
DateDiff returns a Variant (Long) specifying the number of time intervals between two specified dates.
SwingXH
Thank you PHV,
assume I have two dates,
MyDate1 = Format(Time(), "dd/mm/yyyy hh:nn")
MyDate2 = Format(Now(), "dd/mm/yyyy hh:nn")
how can I get the difference between them, in terms of days, hours, and minutes?
Thanks,
SwingXH
First of all, thank you very much!
I used the following codes,
MyTime = Format(Time(), "dd/mm/yyyy hh:nn")
Open "TESTFILE" For Append As #1
Write #1 MyTime
Close #1
And I got
"30/12/1899 08:14"
The date is not correct(should be 08/09/2004). And how can I remove the quotation mark? ( I...
When I use Time(), it gave me 1899-12-30-06:42:14. The hour is correct. How to get the correct system time including dates?
Also, I want to write an output file with append property, how to write the right code?
Thanks a lot!
SwingXH
when I change both field to numerical fields, i still get the same tyoe mismatch error.
for example
stLinkCriteria = " ID = " & Me.ID.Value And "ID1 = " & Me.ID1.Value
DoCmd.OpenForm "form1", , , stLinkCriteria
Both mainform and form1 have fields ID and ID1.
SwingXH
I have a form, mainform, to be used as input form.
Assume I have fileds ID and Name to control the data record on another form, form1.
I used codes like this
stLinkCriteria = "[ID] = " & Me.ID.Value And "Name = " & Me("ComboName").Value
DoCmd.OpenForm stDocName, , , stLinkCriteria
But got...
Thanks.
For record 1, When I use
Me.Combo30.RowSource = "SELECT * FROM Employees WHERE Height>5.5"
it gave me 1, which is the ID.
If i use
"SELECT Height FROM Employees WHERE Height>5.5"
it gave me 5.6.
However, what i want is the field name, I want "Height" when Height>5.5.
How to write the...
Yes, then what is cbo in the codes you gave me?
me.cbo.ComboField.rowsource = "SELECT * FROM X WHERE Y..."
For the example table I have in previous posts,
how to write the query to get field name "Height" for height>5.5?
Thanks a lot,
SwingXH
Sorry, I do not get it. My combo box is not bound to any table. What is the field name for the combo box? Can you give me a simple example?
Thank you very much!
SwingXH
for now, as a start, I'll make it in the form load event only and only for the current record. But later I wish when I switch to different record on this form, combo box row source will change dynamically.
When I use the code above you mentioned, got an error "Method or data member not found"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.