Call me lazy... I'm using FrontPage Database results wizards to retrieve data from Access. I have a cookie containing a number I'd like to insert in a custom query. Whenever the page opens, I want the query to run using the value in the cookie. I haven't been able to figure out how to transfer the cookie value into somewthing the FP webbot will accept in the query. Any ideas??
I have a table called Client Info which stores the clients name and their requirements (Gas safe etc). And I have a table "Job List" where i select from a drop down menu the clients and it auto fills all the requirement check boxes based on what is stored in the Client Info table. However I can't get the code to work.
Private Sub Client_Click() [job_list].[Gas_Safe].Value = [client_info].[Gas_Safe].Value End Sub
I have a form based on a table (master) with a cbo which returns yes or no according to what users select.
I then have another form which get's its data from a query based on the above table (master). This time, the value I have selected in the previous form using the cbo, should be displayed using a check box.
This is how I would like it to work:
If Me.cbo = yes (meaning that the value selected is yes), then
check box should show be checked.
If Me.cbo indicated NO, then, the check box should not be checked.
I'm trying to get a field in my Data Access Page to display the last time a field was updated, I figured I would have to do this in HTML, after a lot of dead ends elsewhere. Here is the code:
<SCRIPT language=vbscript event=BeforeUpdate(dscEventInfo) for=MSODSC> <!-- Dim DateModified DateModified = Date 'Current System Date dscEventInfo.DataPage.Recordset.Fields("DateModified") = Date
--> </SCRIPT>
Any clues where I would enter this in the HTML source?
Here is my problem. I have several fields located on a form. The user has a problem finding the curser on what field its on. I did ok with the text fields, but I need to come up with something for the check boxes. Any Ideas
The code below works good for text fields. But I need to do the same for Check Boxes or the Check Box Label that is associated with the check Box.
Private Sub Ctl4bCode_Enter() Me.Ctl4bCode.BackColor = RGB(255, 0, 0)
End Sub
Private Sub Ctl4bCode_Exit(Cancel As Integer) Me.Ctl4bCode.BackColor = RGB(255, 255, 255)
I am planning to give different rights (AllowEdit, ViewOnly…) to the user on accessing forms and reports in a db on a single pc instead of dealing with server as my client have only one pc.
As a present requirement, db would be in one pc only and would be used by 3-4 users. I need each of users to limit their access to some of the forms and reports in the same pc. To get it, what I did is as follows:
Example:
One of my tables called tblEmployees (Back End Table) linked in FE containing following fields:
There is a login menu form. Something like 2 text boxes on the form and opening at the startup. User selects his name from a combo and types his password. If the user is available in the tblEmployees, Access opens main form and store UNumber and UName with time stamp in a local table called “T_CurrUser. If user not available in tblEmployees, it should close or give some msg.
Now, when the Main form opens (after login with correct user and pwd) and user wants to click different command buttons to open the form, I need to write code to check whether the current user have right to open the selected form (check marked to allow opening this form in the table tblEmployees) BEFORE opening it.
If check mark is set to false on F1 in the table tblEmployees, it means he can’t open form1, and a msg should pop up “Not allowed to view”..Something likes that.
1. I don’t know the code I created with simple if then, where to write ? I mean on which event of form ? On open / On Activate or where. Bcz the code should run before form opens and should check the table whether the user have check mark value true or false.
I tried to write the following code but some time it works some time doesn’t. What is wrong with code lines?
On Click of Command Button that opens Form1
Dim USR = DlookUp(“lngEmpId”,”T_CurrUser”) ‘ Local Table emp.
‘To check if Form1 check mark is set to true If DlookUp(“F1”,”tblEmployees”,”lngEmpId=USR)=True Then Docmd.OpenForm “Form1” Else End If
When another user logs on the same pc (off course, after login out of first user) the local table T_CurrUser record will be replaced with new user. Note that local table T_CurrUser contains always one record. Hopefully I described correctly.
I have created code to import and excel file and create a table from that info. Now I need to confirm that the import has the correct Datatype of Number and Fieldsize of Double for one of the columns.
Enforce referential Integrity and Cascade Update Related Fields
Thus, it is possible to change the name of the state or city, but can not be deleted until the state is associated with some of the city.
I also made a form for the "state" in which is the list that contains a list of all states. The name of the list is "lstState". So that I can delete the "State" I make a button in form and I use the following code:
Code: Private Sub DeleteState_Click () If IsNull (Me.lstState) Then MsgBox "Select the state you want to delete", vbCritical else DoCmd.SetWarnings False
[Code] ....
Everything works fine when the state is not assigned to any one city. But the problem arises when trying to delete a state which is assigned to the city, that is when I select this state and click on the delete button then the state is not deleted - this is ok, but without any message told why the state is not deleted and that's the problem.
My question is how to make the code that the user receives a message that such State can not be deleted because there are cities that are associated with it.
I need help on this, from what the best concept is, to what I need to look into using:
I store Quote data from phone calls into tblQuotes. There is a seperate table that holds much of the same information except that it is for actual orders called tblOrders.
As far as function goes, I have each working much the way I need it to except for one thing... If a sales person is on the phone with a customer with a quote already in the system, right now they re-enter the data into the Order table. Most times, the order is what was quoted, but maybe with a few small changes (so I will wnt to keep a historical record of the quote). How could I copy the contents of the quote recordset into the recordset for an order, where all the sales rep does from there is edit the quote to the actual order?
Would I use VBA or an update query that is executed via VAB? Honestly, I am unsure how to do this at all, I hope someone has seen this before and has a good suggestion...
I am trying create some code that checks if the contents of the status field in a table is "Authorised" where the ID = something specific for multiple records. If all records witht the specific ID are "Authorised" Then generate a new record in another table. Where to start, perhaps a Dlookup?
I'm in need a of a check-in/check-out application for my company. We have about 550-600 employees at any given time and our turnover is about 20-30% per year. Our check-in/check-out process requires our employees to personally visit between 30-40 areas in our company (personnel, safety, credentials, parking, insurance, etc) within the first month of employment. This is currently done manually and is a huge drain on labor, especially when check-in sheets are lost, misplaced or, in some cases, forged.
I'm looking to build a database that would be intranet based, password secure (by check-in area) that would allow the new employee to present at a particular check-in, check-out site, complete that portion of the check-in/out process and then allow the person responsible for the check-in/out to enter the status into the database. At any point in the process, I would want to know the status of the person checking in/out (how long they've been checking in/out and what portion of the process have they completed).
Works great, but when I hit the number "3", (3 times in row) it will let me into the form. I want it to not let me in IF I don't know the password.
Where did I go wrong?
Private Sub Form_Load() Dim pw As Variant
If InputBox("What is the password?", "Password") = "1" Then Else MsgBox "Invalid Password", vbCritical, "Sorry Charlie" DoCmd.Close If InputBox("What is the password?", "Password") = "2" Then Else MsgBox "Invalid Password", vbCritical, "Sorry Charlie" DoCmd.Close End If End If
I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"
Is there a way to write code that will remove that Lock Project check and check it back on?
I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.
Hi I have sendkey "{f7}" on loss focus. this works great as a spell check but then I get the mesage box that spell check is complete. How do I stop this box from occuring?
Would you be able to have the same databasing power in vb.
a company offered me a job but they would prefer if all my programs where in vb, but i have never even lokked into it. i know there are a few extra thing like menus and stuff like that.
Would i be able to say that since i know vba i would be a ok candited?
I have a query that creates 8 columns, exactly as I want. However, the information in the last 2 columns, Dbk and Com, I'm trying to get on the same row. Right now, when the query is run, the Dbk amount shows up on one row and the Com column is blank, then the next row shows the Com amount and the Dbk column is blank. Is there a way to get both values to show on the same row? Thanks.
SELECT tblCorpCodes.[Client Code], tblCorpCodes.[Client Name], tblCorpDollars.[Month/Year], tblCorpDollars.[Invoice #], tblCorpDollars.[Drawback Entry #], tblCorpDollars.[Claim Ref #], IIf([tblCorpDollars]![Income Type]="Drawback",[Amount]) AS Dbk, IIf([tblCorpDollars]![Income Type]="Commission",[Amount]) AS Com FROM Query4, tblCorpCodes INNER JOIN tblCorpDollars ON tblCorpCodes.[Client Code] = tblCorpDollars.[Client Code] GROUP BY tblCorpCodes.[Client Code], tblCorpCodes.[Client Name], tblCorpDollars.[Month/Year], tblCorpDollars.[Invoice #], tblCorpDollars.[Drawback Entry #], tblCorpDollars.[Claim Ref #], IIf([tblCorpDollars]![Income Type]="Drawback",[Amount]), IIf([tblCorpDollars]![Income Type]="Commission",[Amount]) HAVING (((tblCorpCodes.[Client Code]) Like "566") AND ((tblCorpDollars.[Invoice #]) Like "7315"));
I am new to this forum, so forgive me if this question has been asked before
I needed exact information about the way the 'like' operator works, so I pressed F1, typed 'like' in the "Answer Wizard" and was told to "rephrase my question". :eek:
The index was slightly more helpful as it obviously contains 2 topics with 'like_operator', but choosing them does not reveal anything. :confused:
Where can I find info about such things? I also need to use an operator called 'contains' which I have used when working with SAS, but appearently it does not exist in Acccess or it has another name. Has anybody heard about it?
I have 3 tables: tbl_1, tbl_2, tbl_3 All 3 have the same 3 columns: name, email, code
Can I write some queries or a code or something that can create one "tbl_MASTER" with the same 3 columns?
Ex: tbl_1 - 3 records tbl_2 - 7 records tbl_3 - 21 records
tbl_MASTER - 31 records. Now the information in the other 3 tables changes everyday so I want it to all be automatic, I dont want to execute 3 different queries or anything like that. Is this doable. Thanks.
Can someone point me in a direction to get some good information on how and when to use recordsets? Ive gotten by without having to use them for the most part up until now.. but the inevitable has happened and i figure i might as well learn to use them
for the most part i know When to use them, but its getting into the how and where to use it for the most part.
simple examples or even perhaps a tutorial would be great! thanks guys
Guys i have tried to seach the Forum but can't find a solution to my need.
I would like to get a collection of table names from another DB, what i am trying to do is populate a table with a list of table names that the front end links to and their paths once a user has selected the data file location.
Instead of me having to force a user to place the DB files in a location of my choice when the database first loads it will prompt the user to select the location of the data file then (this is why i need the above) populate a table with a list of table names and their source, then establish a link to them for the front end to work.
Also if i ever send amended DB files or they move the location of the data files they can automatically re-establish the linked tables.
I have been struggling with a project and cannot seem to get a solution. The following is a bit drawn out so I apologies, but if anyone can help - (or tell me if it is not possible) I would be grateful.
I have a club DB with 42 members, and have a table with members details etc.
They meet 12 times a year and I have a table with details of the meetings (each meeting is a separate record with date, venue etc)
I use forms to view the records.
What I would like to do is be able run a query/report to see who attended each meeting/or how many meetings an individual attended over the year. (I have not got to the query/report stage yet, as I cannot figure out how to set up the information).
(I need to know each year how many meetings an individual attends)
I thought of putting a list of the members and a tick box next to their name on each of the 12 meeting records, (which will update when members join/leave) then be able to run a query with the name of the member, and the dates (or number) of the meetings attended, but don'y know how.
At the moment all I can think of is a memo field, and just type in their names on a specific meeting record.