I found the answer.
Private Sub Form_Current()
On Error GoTo Err_Form_Current_Error
DoCmd.GoToRecord , , acNext 'advances you to next record
docmd.openquery "yourqueryname" 'the commands that you want to run
docmd.openquery "yourqueryname2"
Exit Sub
Err_Form_Current_Error:'this does nothing...
MajP
Like you said, "do you just need to automatically read the first record, run a query, read the next run a query ... "
Yes, I have a form and I want to run a set of queries based on that record, then go to the next record on the form and run the queries, and so on until it's done. That's...
I do need to interface with each record. The queries use criteria provided in fields to perform updates.
So the form is based off of a table that has new information that will update other tables.
The key of that form is used as criteria in the update query. So after the updates are run, I need...
thread705-544592
I have a form that is based off a query (using certain criteria).
It displays 1 record at a time.
I want it to do the following.
Run queries (These update queries use criteria from each record on the form. Queries already created)
Move to the next record.
Run the queries...
I have one query that retrieves a record with a date.
I have another query that retrieves a record with a date range.
I want to if the 1 date falls between the range...
Any idea on how to do that?
I have two queries one that pulls a record in the current year with an EffDate of 5/1/12 and the other query for the previous year that has multiple rows.
I want to find which of those 6 records was the one that was active 1 year ago using the EffDate from the current year query.
Anyone have...
so I can do this...
docmd.requery me.nameOfSubForm.form.nameofSubFormssubform.form and put that on an on click event on the Main form that houses the sub and subsub form?
On one(main) form I have a subform(sub1) with a subform(sub2) that I want to requery. Can anyone help me with referencing and requerying a subform?
DoCmd.Requery (reference to sub/subform)
I found some code and now I'm trying to troubleshoot it.
I have 2 issues.
the line with the ~~~~'s errors out and highlights the entire code to the end of the ~~~~'s
The second question I have is that I have placed this in a module, how do I call the module from the form when a button is...
Oh, I do strip down the phone numbers to bare numbers stored in a text field and then format it later. I get so many different incomming fomats from other sources it's easier to work with like that.
It is awesome and I'm learning even more VB by reading through it.
I have one question, what does it do if it finds two strings of numbers that are in the comments? (not in orig scope of question) Would it error out or update the same field twice?
If I have a phone number in a comments field with words before, before and after or after with any of the formatting then I want to pull that data out and put it in a field called phone number.
An update query or vb behind a form would be cool too.
phone numbers could be formatted...
I want to get data from an ms access database using outlook to create a formatted e mail that can be sent out by the user.
This e mail would use about 10 fields in a temporary table. In the table the user name of the person wondering if the person's e mail address could be used and linked to...
Actually...
if the clid = 8 then set the values,
if the clid <> 8 then give the yes no msgbox and set the values for the 'yes'... but on the 'no' do nothing
Thanks
Private Sub Form_BeforeInsert(Cancel As Integer)
If CLID <> 8 Then
DateEntered = Now()
Login = CurrentUser...
Randy... can you look at this...
If CLID <> 8 Then
If MsgBox("If the last record is less than 6 months old you must apply units shown to that 'contact path', otherwise, add the units shown to a new 'contact path', see Property Manager for details.", vbYesNo + vbQuestion, "Business Rule...
I want to prompt the user to make sure that they want to add a record.
There is one exception... if the client is equal to clientid = 100, otherwise prompt
text in the box "Are you sure you want to add the record?"
Yes, then add
No, then cancel
I have this query that uses MRI database if anyone knows that software.
The query has 10 sub queries... I'm having trouble breaking up the 1 into it's 10 to find the problem...
Any help would be appreciated.
Thanks,
Select distinct name.unitid AS [Unit ID], (Select Distinct chgcode from...
I have the desire to put my database on a web server. There are companies out there that host them.
I am however concerned on the security of the data on the server and the transmission of the data from them to my sites.
What options should I ask for to ensure that my data is safe from point...
Doing well, Thanks for your answer... I have another question about the syntax and the meaning...
How does it know that 1 is to run A and 2 is to run B .... ? Is it the order in which they are listed above?
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.