Opening Form Using Multiple Criterias

Nov 11, 2005

I have a query that searches data based on criteria input into five search fields in a form. The resulting data is then displayed in a list form. I would like to code this into the search form and do away with the formula in the query. I have tried coding this using the following formula in the open statement of the list form. However, I run into trouble when I tried multiple criterias. Can some one show me the proper way of finding data using several search criterias?

Dim StDocName as String
Dim StLinkCriteria as String

StDocName= “FormName_frm”
stLinkCriteria = "[field1]=" & "'" & Me![field1] & "'"

DoCmd.OpenForm StDocName, , , stLinkCriteria

View Replies


ADVERTISEMENT

Opening Form On Multiple Criteria

May 19, 2005

I have a patient form that has a subform showing the care plans. At the side of each care plan for that patient i have a button that if clicked will take you to the specific care plan. I need this to open the care plan form based on multiple criteria which is

Date (Date Field)
Care Plan Number (Numeric Field)
Patient number. (Text field)

These fields are all on the subform and will be populated.

Any ideas? :confused:

View 4 Replies View Related

Forms :: Opening A Form Based On Multiple Tables On A Specific Record

Dec 31, 2014

I have a form "frm_PatientNew" based on table "tbl_patients", this form contains a button "cmd_NewVisit" which is supposed to do the following: opens the form "frm_NewVisit" for recording a new visit for the last recorded patient in "tbl_Patients", I found many approaches depending on DMax and Dlookup and they worked fine just if "frm_NewVisit" is bound to "tbl_Patients", but "frm_NewVisit" is bound to "tbl_Main" which acts as a container for all information (patient data, visit data,service done and service provider), so the form "frm_NewVisit" contains fields from different tables. I wonder if I should create "frm_NewVisit" as unbound form, then adding fields from different tables to it and using vba to populate "tbl_Main",

View 2 Replies View Related

Dcount: Combining Two Criterias - Stuck

Oct 14, 2007

Hey,
I'm trying to calculate the number of episodes downloaded from one animation series. I've managed to find two working criterias, but I fail to combine them:

This counts the total amount of episodes for each induvidual anime:
DCount("AnimeFansubberEpisodeID";"AnimeFansubberEpisode";"[AnimeFansubberID]=" & [AnimeFansubberID])



This counts the TOTAL number of episodes from ALL series which have "Download status = Yes"
DCount("AnimeFansubberEpisodeID";"AnimeFansubberEpisode";"[AnimeEpisodeDownloadStatus] = -1")



What I really want is to calculate the totl amount of episodes for each individual anime, which has "Download status= Yes"


DCount("AnimeFansubberEpisodeID";"AnimeFansubberEpisode";"[AnimeFansubberID]=" & [AnimeFansubberID] And "[AnimeEpisodeDownloadStatus]=-1")
This is the only code I've come up with that works - but it counts ALL episodes from ALL series, which is kind of not important..


I hope this is possible.. Thanks in advance

View 2 Replies View Related

Setting Field Criterias (numbers And Letters)

Feb 13, 2008

The data that is to be entered in the field "Rank", is either RK1, RK2 or RK3

How would I make the validation in a table make the user enter the format RK(Number), with only numbers from 1-3?

Thanks!

View 4 Replies View Related

Forms :: Closing Opening Form With Timer Then Opening Main Menu

Apr 7, 2014

I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.

Private Sub Cover_Page_Form_Load()
OpenTimer = Timer
End Sub
Private Sub Cover_Page_Form_Timer()
If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes
End Sub

Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.

View 5 Replies View Related

Opening Multiple Databases

Jun 28, 2006

Hi Folks,

Hoping someone may be able to point me in the right direction.

I've got several databases used for different tasks, in which I just added an hyperlink to them from a front end database. All my team could access any of the data bases at once. It was using the WINNT/MS OFFICE mdw file.

Since my last question, I've now managed to set up a MS Workgroup Administrator file, which is on a shared drive. Everyone has joined this workgroup, and when people logon it now greets them with their name and records their name against any tasks. Thanks to everyone for their help with setting this up.

But since I created this new workgroup, we can't access more than one database at at time. It comes up saying 'mdw file is in use'. However, one person in the office can. I've looked at all the setups for individuals, and can't see any difference between ours & this one individual.

Am I missing something obvious ?
Cheers
Karen

View 4 Replies View Related

Trouble Opening Database For Multiple Users.

May 22, 2006

We have an access Database stored on a server that until now was only ever accessed by the one user. Now more users need to access it at the same time. However when a second user trys to open the database the error message "File Already in use appears". I did not create this database so have no idea how it was set up. I think it may have something to do with being opened up exclusively. Is there anyway around this by creating a short cut or changing any kind of propertties?

View 2 Replies View Related

Forms :: Opening A Form From Another Form Via Combo And Auto Loading Form Data?

Apr 14, 2015

I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.

The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.

The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.

View 9 Replies View Related

Forms :: Access 2010 - Opening New Form And Closing Current Form?

Mar 14, 2013

I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)

I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.

All I am trying to do is have a [Back] button on a form to open another form and close the current form.

Private Sub cmdBack_Click()
DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs)
DoCmd.Close acForm, "frm_ExportWizardPage3"
End Sub

The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.

Could this be anything to do with which form has the focus when I open the new form?

View 2 Replies View Related

General :: Clear Sub Form At The Time Of Opening The Main Form?

Jul 24, 2013

I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.

Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine

View 2 Replies View Related

Opening A Form Based On The Same Table As The Calling Form

May 22, 2006

Hi All

I have a form based on a table called tblListMaster and I want to allow users to open up another form showing all the members of one of the entries in that table so I have added a button called 'Show List Members'.

The list members form which I then want to bring up is also based on tblListMembers (it's a master-detail form). When I hit the button to open up the list members form I get an error message saying that the table is already opened exclusively.

I can understand why I get that message so I thought I would be cunning and create a dummy form which I open up, passing in my list id in the openargs (at that point I also close the original form) and then from that dummy form automatically open up the master detail form and close the dummy.

Code in List Master form

Private Sub cmdListMembers_Click()
' open up the list members form

DoCmd.OpenForm "frmDummy", acNormal, , , , , Me.ListId
DoCmd.Close


End Sub

Code in Form Load of dummy form

Private Sub Form_Load()

DoCmd.OpenForm "frmMaintainListMembers", acNormal, , , , acWindowNormal, Me.OpenArgs
DoCmd.Close


End Sub

Sadly I still get the same error message - does any one have any ideas what I'm doing wrong?


Gordon

View 4 Replies View Related

Forms :: Opening A Form By Clicking A Field From Another Form

Jul 18, 2013

I'm creating a database to track new policies request. I have a form in datasheet view that displays a list for all Initial Review and Draft status. I would like to click (... or maybe double click) on the Policy Name field that will display all fields into single form that is link to PolicyID ... to update any info needed. In other words i want to click on that record to be display in actual form.

Private Sub PolicyName_Click()
Dim stDoc As String
Dim stWhere As String
Dim strsql As String
Dim DB As DAO.Database

[code]....

View 1 Replies View Related

Opening Form To View Latest Form

Mar 12, 2008

Form: entryform

Fields:
RecordDate
Department
DepartmentNumber
7 text fields
6 memo


What I am looking to do is be able to click on a combo box for departments so that once a department is selected, the latest record for that department is populated in the form, however, it is opened as a NEW record so that when any changes are made to the information in the form to the text or memo fields, it is saved as a new record.

I'm having a lot of trouble with this.
Thank you very much in advance for your help.

View 7 Replies View Related

Opening A New Form From A Form Using Command Button

Aug 11, 2006

:rolleyes: Hi this is my first time using this forum, I hope someone can help.
I have a form 1 and I want to open another form to display data specific to the record showing in form 1.

I have done this many times successfully but now I am getting an error msg "The sepcified field '[UnitID]' could refer to more than one table listed in the FROM clause of your SQL statement.

I have tried everything but cannot solve this one. Any suggestions?

:)

View 4 Replies View Related

Cmd FormOpen Locks Form When Opening New Form

Mar 31, 2008

I built an info application for a friend in business. Its based on a kiosk style menu with selections, and when a button is clicked it executes "FormOpen" and brings up a second form with the results in it.

Its important for this application that they are two seperate forms which display the results, lets call them form1 and form2 for this exercise.

My problem is that when form1 opens form2, it LOCKS form1. And if you are to try and select a list menu, or click a button on form1, when form2 is concurrently open, it 'beeps' with no function. Whether it be by .disabled or whether its some sort of record lock (to stop a person from editing in two places at once), I'm not sure.

Basically, form1 never needs to have records updated, its the kiosk remember ie. form1 serves as a menu. But when form2 is open i would prefer it if they could could still click buttons on form1 to execute filters for the query i have on form2.

I've tried fidding around with the .disabled property on form1, and then i also thought about the record lock and tried DISABLING data entry on the first form so perhaps access could work around. Nothing has worked. There is also nothing in the book that i have on access.

Please help!!! You will be much loved. Even if you just tell me its not possible then i can sleep easy.

Kind Regards

Jeremy

View 3 Replies View Related

General :: Opening A Form From A Form In Different Database

Aug 31, 2012

Is there a way to open a form from a form in a different database? I'm pretty sure it needs to be done in VBA and have seen some code floating around that suggests it can be done, but I'm thinking there's more to it, like maybe one or both of the DB's need to be in a different format?

View 9 Replies View Related

Opening Forms Directly (instead Of Opening MS ACCESS)

Apr 20, 2006

Hi All,

Is there a way that when the user clicks on a database file, the form pops up without opening MS Access window.

Thx,

Jatz

View 1 Replies View Related

Opening Forms Directly (instead Of Opening MS ACCESS First)

Apr 20, 2006

Hi All,

Is there a way that when the user clicks on a database file, the form pops up without opening MS Access window.

Thx,

Jatz

View 6 Replies View Related

New Form Opening

Feb 18, 2005

Is there a way you can set where a from Opens in relation to a button or a piece of text you select.

Basically I have a main form, with some selectable options on the LHS of the screen, rather than use buttons I have text boxes programmed to open a form using the "On-Click" event, I want the new form to open right next to the text box, so it will look like a drop down menu.

Additionally the main form could be moved around the screen, is there a way of locking the 2nd form to be next to the text box ?

Additionally I know I could use a list to but I am trying to design the DB with a certain look.

Many thanks

MattP

View 1 Replies View Related

Opening Form

Oct 4, 2005

I have a combo box with 4 choices and it is limited to the list. Based on the value the user selects I want to open 1 of 4 forms. Tried using the select case but does not work?

any suggestions?

Jon

View 2 Replies View Related

Opening Form

Feb 3, 2006

Hey, just one quick thing.
Whenever i open my database i want my form to open automatically, i'm only using oe form and one table, but the only thing im going to need to use is the form.

Cheers Guys!

View 1 Replies View Related

Help With Opening Form

Feb 12, 2006

Help!!!

I am new to access and data bases

I have a table "Body shop " with fields making up Primary key

Shift can be days,lates or nights
Date Short date
Line integer 1 or 2

Given the 3 fields as strings Strshift, Strdate and StrLine
I cannot open a form at correct record, here is what i have tried

Set recset = db.OpenRecordset("Body Shop")
recset.Index = "PrimaryKey"
recset.Seek "=", Strdate, StrShift, StrLine
DoCmd.OpenForm FormName, , , , acFormEdit, acWindowNormal
recset.Close
db.Close
Set recset = Nothing
Set db = Nothing

Thanks

View 4 Replies View Related

Opening A Form

May 17, 2006

Hi, I want to open my form and have all the areas blank.. right now when I open my form, recent records appear.. I don't want to have to click the 'new' button, i just want to have a new record ready when the form is opened..thx

View 1 Replies View Related

When Opening The Form

Jul 12, 2006

what would be the best way to accomplish this.

when i open up a form (call it the issue form)...i want to ask a question to the user "what is your name" i then want that answer to be put into a record on the form...thus every issue the guy solves his name will already be on the form....

View 2 Replies View Related

Re-opening Form From Within It's Self

Aug 21, 2006

Hi,
I'm new to this site, so hello.

I am currently creating a database for the company I work for, and having alot of problems as I go.

At the moment, I am stuck with a form problem. I have created a number of search Querys (using [Enter SerialID] ect. into Criteria). I have then created a form (locking and disabling all fields) to show the data. As the process will be repeated alot each time, I need to find a way to re-open the form, from within the form, so that the dialogue box reappears to enter the next ID to search.

Any ideas?

Thanks, Ben

View 5 Replies View Related







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