Hiya Neo,
Ya wish i had more detail to give you, but i dont. The query itself stopped working. At first I thought it was the form, so I ran the query on its own and nothing was being returned. Just plain odd. I even deleted Ajal's code and re typed it and nothing. Anyway, all is good, and is a better design, one less field to worry about :).
User Profile
Collapse
-
Odd thing happened today ajal's suggestion stopped working.
So I went ahead and deleted the time field and used a single field with date "General Format" and used NeoPa's suggestion and is working. I wonder what change, probably impossible to determine.Leave a comment:
-
-
Can a tab be created in form when a record is created or query is run?
Hello,
This is a design question not a "how to" I would like know if it can be done before searching for a non existant answer :).
If a record is created via a form, can a tab be created on another form from that record creation?
I.e. user creates record 286 (arbitrary number) via FormRecordEntry . Is it possible that a tab be created at that time on FormLog for that record?
I... -
That worked.
Let me asked this from a DB design PoV is it better to have two fields, one for date and the other for time? Or one field with both items in it? I.e. instead of having two fields, one with short date and the other with short time, just have one field with General date and time format? Would the query be simpler then, or would it still remain the same?Leave a comment:
-
Okay, when I run this
I get an error Syntax error (missing operator) in query expression. I think I plugged in your suggestion in the wrong spot....Code:SELECT TableLogEntries.Acft, TableLogEntries.Date, TableLogEntries.Time, TableLogEntries.Comment FROM TableLogEntries WHERE (((TableLogEntries.Time)Date = Now()-1));
Leave a comment:
-
Time Field 24hr query.
Good Morning,
I have a table which has a "Date" field and a "Time" field. The "Date" field is format "Short Date" with a default value of "Date()" The "Time" field is format "Short Time" and the default value is "Time()".
I am trying to query for records created in the past 24hrs by using the following query:
...Code:SELECT TableLogEntries.Acft,
-
-
OMG!
ChipR for the win.
That was the Michael Jordan shot.
May your life be blessed with the fruit of Laurelin.
Thanks everyone for the help. What a great place.
Now if I may ask, with that code you are actually pointing the requery to go to the subform in "FormToLog" , where as with the previous code it was assuming that the subform was within "FormNewLogEntr y"?...Leave a comment:
-
Okay, I tried the above and did not work. Since I may have had some naming issues, I deleted the whole project (it was small so no worry there) and started again. Now, I recreated the tables and forms and inside of "FormToLog" is "SubFormShowPas tDay" which displays past 24hr records using "QueryPastD ay".
Also in "FormToLog" I have a button, this button calls up "FormNewLogEntr y" from...Leave a comment:
-
Okay, I deleted the subform and started from scratch. In the form "tolog" I created a subform using the wizard. I asked the wizard to use query "historyrequest " to populate the subform. The query gets the records for the past 24hrs from table "tolog" to display in the subform. When doing Alt+Enter with the subform selected, the name is "historyrequest subform" this is also the name I gave it in the wizard....Leave a comment:
-
I am looking for the "control" of the subform. As far as the code, that is all there is, well except for this;
Which is just above;Code:Option Compare Database Private Sub addrecord_Click()
Code:# On Error GoTo Err_addrecord_Click # # DoCmd.GoToRecord , , acNewRec
Leave a comment:
-
Okay, I reread your insight again. The part that I am missing is where within the code does the information reside? If I open the form "tolog" go to design view and press {code} to open the VB editor, I get the following:
...Code:On Error GoTo Err_addrecord_Click DoCmd.GoToRecord , , acNewRec Exit_addrecord_Click: Exit Sub Err_addrecord_Click: MsgBox Err.DescriptionLeave a comment:
-
Thank you Neo,
I found that post while searching for "form control" earlier today. I will go back to study it, as the answer still escaped even after reading it. Which could only mean that I did not pay much attention. Hopefully, tomorrow, I'll see the light :).
RegardsLeave a comment:
-
Please note I replaced the error code. In case anyone read it before my edit, apologies.Leave a comment:
-
Okay form "tologentry " is the medium for updating records in table "tolog" in the "OnClose" event for "tologentry " I put this code:
This should refresh "historyreq uest subform" within another form, right? However, it is not happening, and I am getting the following error:...Code:Private Sub Form_Close() historyrequest SubForm.Form.Requery End Sub
Leave a comment:
-
You know I think I am going about this the wrong way. I posted the vb code for the button that is open a records entry form. Where I think i should post the code for the records entry form for an "OnClose" event. Let me double ck.Leave a comment:
-
Hmmm okay, did this:
"code deleted to save space, sorry"
Still get datasheet ivew, and now I get error "Object Required" upon clicking the button to add record.Leave a comment:
-
Thank you for the reply.
I did that, but I still get the query data sheet view on top of the subform being refreshed. I guess I didnt put it in the right spot. Here is the button code.
...Code:On Error GoTo Err_addrecord_Click DoCmd.GoToRecord , , acNewRec Exit_addrecord_Click: Exit Sub Err_addrecord_Click: MsgBox Err.Description ResumeLeave a comment:
-
Subform refresh and query view.
Hello again,
I have a subform that gets populated from a records query. I needed the subform to refresh once a record is added via another form. I accomplished this by re-running the query for the subform upon closing the record addition form. It works like a champ, except I also the get the query datasheet view in addtion to the subform.
I am sure there is an obvious answer, that I am missing. Please let me know...
No activity results to display
Show More
Leave a comment: