Accessing A Form By Formname?

Dec 1, 2005

I currently am trying to do this:

dim a as form

a = me.form

I get the following error: "Invalid use of property"


Is there a function that lets you select a form using its name.
eg: makeactiveform("NameOftheForm")



Or alternatively if there is a function that gets the activeform. (it's for use in a module)

I you can help me Thank you!

View Replies


ADVERTISEMENT

Using Forms!FormName!Control Is Null In Criteria

Sep 12, 2007

I learned the criteria on this forum
Forms!FormName!Control or Forms!FormName!Control Is Null

It enables me to leave the text box on a search form blank to return all records. This seems to work but has a very odd behaviour.

In design view, I typed the criteria for 3 fields and saved the query, but when I reopened it, the criteria added 3 NEW COLUMNS and spread over 8 ROWS (as in the image attached.)

The SQL was even unreadable:

SELECT Table1.ID, Table1.FldA, Table1.FldB, Table1.FldC
FROM Table1
WHERE (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldB)=[Forms]![Form1]![txtB]) AND ((Table1.FldC)=[Forms]![Form1]![txtC])) OR (((Table1.FldB)=[Forms]![Form1]![txtB]) AND ((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtA]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtB]) Is Null)) OR (((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtB]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldB)=[Forms]![Form1]![txtB]) AND (([Forms]![Form1]![txtC]) Is Null)) OR (((Table1.FldB)=[Forms]![Form1]![txtB]) AND (([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND (([Forms]![Form1]![txtB]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null)) OR ((([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtB]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null));


I don't know how to add the criteria for the 4th field.

Can someone help?

Thanks

View 7 Replies View Related

Forms :: Form Already In Use Or No Permissions When Multiple Users Are Accessing A Form

Aug 11, 2015

I have my application split, BE and FE. This is a form with a subform.For both I have the properties set to

Data Entry NO
Allow additions NO
Allow Deletions NO
Allow Edits NO

anyone person can open the form, but when a second person tries to open the same form we get the standard, locked by user or user does not have permission.If user 1 logs out then user 2 can get in. So it seems not a permission issue but some setting I have wrong. maybe at the query or table level?

View 6 Replies View Related

Form Accessing Table - Very Slow!!?

Feb 17, 2005

Hi,

I have developed a small database with 3 or 4 forms which works ok on most PC's. But when I put it on a certain PC, it almost works properly except for one form which is very slow accessing the table!
Eg. It could take 2 minutes to use a combobox.

All PC's have Access 2000.
Would there be a reason for this?
Is this an access problem or a PC problem? Are there special settings that I'm unaware of?

Thanks in advance

View 1 Replies View Related

Accessing Subforms From Main Form

Jul 25, 2006

I have two subforms. They are in nice neat grids as access setup for me. Both of these forms should have similar data, based on a upc. What I need to do is turn the text of an entire row to red when there is no matching upc in the other subform. The two problems I cannot figure out is as follows.

1. How can I access the forecolor property of a text box in a subform from the main form?

2. How do I access only one row of data, in the default grid?

Any help would be greatly appriciated.

View 1 Replies View Related

Accessing Field From Previous Form

Dec 6, 2012

I'm working with a form (MainF) ... which has a subform (MainSubF). The subform has buttons that link you to other forms. When you click on one of those buttons, I have a control number that links the two forms by putting a CTR field into the linked form with a ctr defaul that = forms!mainf!ctr.

My problem is that I'd like to use this subform on other forms. However, if I put the subform onto another form such as "MainTwo", none of the buttons on the subform will work because the path is now wrong. Is there a generic way to connect the buttons to whatever form the subform is attached to??

View 6 Replies View Related

Limit User From Accessing A Specific Form

Jan 11, 2008

I am having a problem restricting a user from a certain form.
I have a module that detects if a user or admin based on the roles entered in the employees table.

If their windows login is not listed in the employees table, they will not be able to view any of the forms.

Here's my problem, I want the users to access the switchboard, but they should not be able to get into the reporting button.

here's my code:
If LOAStatusbtn.Caption = "View Report" _
And Not admin _
Then
'useraccess denied because not an admin
error_text = "You do not have privileges to access this screen." & vbCr & "Please contact an administrator"
MsgBox error_text, , "No Privileges"

End If

If they click on LOAStatusbtn and their role is not admin, then a message should pop up.

I searched the forum and could not find anything similar to this.

Thank you,

View 4 Replies View Related

Accessing Subform Info From Form Button.

Jun 13, 2005

I have a form containing a subform.
Inside the form, i set up a button. Inside the OnClick code of this button, i need to access the information inside the subform.

To access the info inside the form, i know:
Me.Fieldname

But inside the subform, i have tried:
Me.SubformName.FieldName
or
SubformName.FieldName
And both did not work.

How can i?

View 2 Replies View Related

Reports :: Accessing Data From Form To Report

Mar 25, 2014

I Created a database that allows the user to create a jobsheet (Sign off Sheet) with inputting minimal information.I am having some problems accessing the data from my form to a report. I managed to get the full name of my AssignedTo and OpenedBy come up with this

=Trim(IIf([tblJobSheet] & " " & [tblJobSheet.AssignedTo] & " " & [Title] & " " & [FirstName] & " " & [LastName],[Title] & " " & [FirstName] & " " & [LastName]))

But this is only bringing up the information in my tblContacts and not actually assigning itself to the jobsheet. I have tried to just put in the "assigned to" but then this comes up as the ID number rather then the full name. And I have also tried to do this via the join table tblJobSheetContact but this only brings up Mr.

View 9 Replies View Related

Modules & VBA :: Accessing Form Functions From Module

May 22, 2014

I want to put some form functions into a module.here is what I currently have in the module:

Public Sub Fun_Test()
Forms!Form_Output!Sequence.ColumnWidth = 250
End Sub

my form name is "Form_Output" but it still cant find it..

View 1 Replies View Related

Accessing Sub-form From Main Form

Mar 30, 2005

Hi

I apologise for the newbie type question. However, I am a VB not an Access programmer and the syntax for sub-forms always confuses me! (The FAQ by "SJ McAbney" did not help.)

I have an ADP project (pointing to SQL Server, if it makes any difference) and have implemented a security model based around Active Directory. I use this to set a public variable called "lngSecLevel", the higher it's value the more security the user has.

To impose the security, each form has code similar to the following in the form's open event:

If lngSecLevel = 1 Then
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False
ElseIf lngSecLevel = 2 Then
Me.AllowEdits = True
Me.AllowAdditions = True
Me.AllowDeletions = False
ElseIf lngSecLevel = 3 Then
Me.AllowEdits = True
Me.AllowAdditions = True
Me.AllowDeletions = False
ElseIf lngSecLevel >= 4 Then
Me.AllowEdits = True
Me.AllowAdditions = True
Me.AllowDeletions = True
End If

(so "me" obviously is the form)

I have a sub-form "frmFile Damages sub" which is available on multiple forms (i.e. several different and distinct forms, which display the information on the "frmFile Damages sub" sub-form).

The issue is that it is possible for the same user to have different levels of security depending upon which "master" form is displayed (this is a business requirement).

As the sub-form's open event is called before the master form's open event, I cannot just place similar to the following in the sub-form's open event:

Me.AllowEdits = Me.Parent.AllowEdits
Me.AllowAdditions = Me.Parent.AllowAdditions
Me.AllowDeletions = Me.Parent.AllowDeletions

The alternative is to modify the main form's open event with the following code (but after my first snippet):

Me.[frmFile Damages sub].Form.AllowEdits = Me.AllowEdits
Me.[frmFile Damages sub].Form.AllowAdditions = Me.AllowAdditions
Me.[frmFile Damages sub].Form.AllowDeletions = Me.AllowDeletions

However, I cannot get the above to work, irrespective of the use of "!" and ".form".

Any help would be appreciated.
Marcus.

View 2 Replies View Related

Lan Accessing Problem

Jan 5, 2007

i have a strange situation with a friends network

database is on laptop, the pc downstairs can open and access the db fine, but the pc next to it upstairs can see the db but gets an error on opening - of course they are using a german version of access so im not entirely sure of the error message but its basically "cant open the db on this intranet, copy it to your pc and then open it"

all pcs are running xp and the same version of access (2002)
the db is in the laptops shared docs folder
one pc can open it fine
the pc in question can open and edit a word doc (for example) in the same folder but not the mdb
i can map the drive on the pc as well

it seems more of a win xp file permission thing but the pc can open and edit a word doc ok

the only thing (seemingly) different with the 3 pcs is that the problem pc is in english and the other 2 in german (but why that would matter i dont know)

i'm supposed to be the pc guru but this has me stumped - any ideas ?

View 12 Replies View Related

Problems Accessing A Mdb

Jan 16, 2007

Hi there

I got a little problem here. I have a mdb that must be moved to another pc, but whenever I try to open it (on the other pcs) I get the message that I don't have permission to read.
When I try to change the permissions it says that I must be an administrator to do that, but I am the pc administrator, so I guess it must be the mdb's administrator.
Does anyone know how to change the permissions, or how to make me the program's administrator/proprietary?
Thanks for your time people!

View 3 Replies View Related

Accessing The Right Database

Nov 22, 2004

I have copied a database that I used for another project for a new one. Everything is the same but when I try to use the command buttons on the form it give me "no record found" error, even though there are records in the database. I know that the Error message is the one that is writin in the database by the orginal designer, I can't quite figure out how to fix the problem I think that it has something to do with the VB coding in the comand button, becuase of the type error message that I am geting, but I don't know how to do it. I can't post the database becuase it is way to big. Everything else is working fine. What hte command button is supposed to do is update a total score percentage based off the numbers that placed in the database also any of the score can be left blank as to not count, max for each score is 5 min is zero, i.e.score1=3score2=5score3=5score4=score5=4score6=3Total Score =80.00%I hope that this makes sence.J

View 3 Replies View Related

Accessing SQL Server

Feb 25, 2005

I have time entry program that the company I work for recently purchased that uses a SQL server 2000 Back end. I can connect to the database just fine if I create a project in Access. What I need to do is take data out of a couple of the tables in the SQL Server and place them in an access table. I really don't want to add any code or tables to the Access project that I created since it seems it would add tables and queries to this products database. What would be the best way to siphon data out of this software package for my own use? This would become a daily process so it needs to be fairly automated and easy.

Thank you for your help.

View 2 Replies View Related

Accessing Subform

Mar 28, 2005

I have an access db and I want to access the subform on
one of my forms. Can someone help me with the syntax
to access these forms.

I tried this but it did not work.
Code:formname.variablename

View 1 Replies View Related

Accessing The Database Properties..

May 6, 2005

Ok, Let's say I go into File->Database Properties from the "main" Access screen. This brings up a window with the title "<database name> Properties" where <database name> is the same as currentproject.name.

This window has several tabs including "Summary" and "Custom." It looks like this should be stuff that I can set and then reference from within my code.

My thought is that I can use the "Title" from the "Summary" screen as a variable for all of my msgbox titles. The other interesting one is "Project" on the "Custom" tab. It looks like this may be the same sort of thing.

I've found that the Access Help is absolutely useless - I'm about ready to take a shotgun to "Clippy." But as they say, a display is a terrible thing to waste <grin>. I've also found that it's getting harder and harder to find what I'm looking for in the MSDN library. There's so much stuff and they don't always file it in logical places.

Well, thanks for reading.. sorry for the rant. As usual, any help is appreciated!

Cheers!

View 2 Replies View Related

Accessing Back End Over Network

Oct 31, 2005

Hi

I've got a back end database on one of my computers and i'm trying to get the link tables to work over a network from another computer. Ive set the link tables up but it wont let me edit any data because it is read only. Its not read only when i run the front end from the computer that stores the back end. How do i enable the front end to edit the data over the network?

also, it is a multi-user system so i want multiple front end parts accessing the one back end but whenever i try and access the data from one system when another is already open it says the file is in use and i can't do anything!

I'm really stuck at the moment and i really need some help please! :confused:

View 1 Replies View Related

Error Accessing Network

Mar 7, 2006

I am making a database and after a small amount of progress I save it and then copy and save with same name but with an extension V1, V2 etc. so that I can keep a working one as backup. Throughout this process I have come across 'Error accessing Network' connection may be lost.....! I have to go back to my previously saved version and redo the changes I was making. This time I didnt save until I was about to make my usual backup and I had quite a few changes. How can I stop this happening and make my last DB work again.

View 1 Replies View Related

Accessing Database From Front End

Mar 31, 2006

Hi there

I have an application that I run in our business.

Everytime I make changes to the code I have to export all the tables from the original into the latest version of the database with the new code.

This is a pain and makes updates time consumming and prone to error.

Is the soloution to have 2 databases. One with the tables and the other with the code (forms), & reports ect

If so, how do I access tables in the 'tables' database from the 'front end' database??

Thanks in advance

OLiver

View 3 Replies View Related

Problems Accessing Backend

Jun 6, 2006

Hi,

I have split db with the backend residing on a computer in my workgroup in the shared files folder. I have access to the folder and can view the file perfectly fine on the other computers in the workgroup (a wireless 54Mbps network). The problem I am having is that almost every time i access the backend tables from another computer in the workgroup, access freezes up and has to be shut down. Sometimes, after restarting access it works fine, others not at all.

Any suggestions or help would be greatly appreciated.

View 1 Replies View Related

Help With Accessing Toolbars And Right-clicking

Dec 5, 2006

Hi all! Hope you can help me yet again!

My company recently completed a fairly large website for a local travel-agency. The website runs on a MsSQL and .net platform, but (It is a big but(t) by the way) a pricing calculation database is a old MS Access 2000 application.

The users of this DB have MSA2000 installed on their computers, and the database is made with one application DB and connected tables.

My problem is that I have to make some small changes to this DB, but when I start it up, the toolbars is hidden and right-clicking is disabled. (F11 works).

Is there a workaround this problem?

View 1 Replies View Related

Problems Accessing Backend

May 1, 2007

Okay,

This is a bit of a weird one I hope someone can help with. I have a fairly small db that needs 3 con-current users. It is split and until recently, the backend resided on one of the computers in the shared folders directory. In this configuration it worked fine, but just recently I have set up a network using a Mac OSX server (xserve) and it is causing a bit of grief. It seems that only one user can access the backend at a time and I have tried just about everything listed in these forums with regards to permissions etc. One bizarre thing is a post here suggested I join/create a new workgroup, did that, stored on the same shared directory on the server. Every time one of the other users on the network joins the workgroup, then re-opens the frontend, they are still logged in as Admin, not the new user recently created. The folder where the workgroup file and backend reside definitely has no access restrictions. Is it something to do with the Mac environment or something else. The only way around it so far is to log 2 of the computers to the server as the same user, this sort of works.
Another weird thing is every time one of our users opens the frontend, a new workgroup file is created, system1, system2 etc. Is this normal?

Any suggestions you might have would be greatly appreciated.!!

View 2 Replies View Related

Access Accessing A SQL Backend

May 4, 2007

I have an MS-SQL backend which i use for my data source. I then use Access for reporting services. (It works so much better than SQL Reporting Services 2005).

this seems simple, but i can't get it to work. Everytime the users start up access, It pops up a login and password for the ODBC link. Even when i have the password and login setup in the ODBC DSN, it still requests it everytime you start connecting to the datasource.

Is there anyway to somehow hard code this into the Access front end somehow so i don't have to give the password to the users?

View 5 Replies View Related

Accessing Feilds In A Table

Jan 13, 2006

Ill start from the dawn of time

right all tables are like a 2d array so does any body know how i can access a field in a row of a table ie like in most languages it goes a bit like this ArrayName(1,1) with ArrayName being the name of the table and that access the first field of the first row. im new to Vba and access 2000 but all i want to do is access the fields in a column of a sub-form displayed as a table add them all up and place the answer in a text box on the main form stick all this in a function so i can run it inside a macro

q1 is this possable
q2 how do you do it

thanks in advance john

View 5 Replies View Related

Accessing A Field From A Table

May 17, 2007

Hi!

I'm making a test database for DVD rentals. When A loan is made I have an update query that sets some fields in the DVD copy table. One of these fields needs to be set to the primary key of the loan made. This would be the last entry on the loans table. I don't have any idea what to put in the 'Update To' box in the query though.

Wrong code here, but this may help explain what I am trying to get: Tables.Loans.LastLoan.Loan ID

Also heres an image of my query:
http://i92.photobucket.com/albums/l15/mikegrundel/Accessproblem.png

Help would be much appreciated. Thanks :)

View 3 Replies View Related







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