Can You Check My Code? Cookie Info Into A Db, Thanks!

Aug 25, 2005

Hey guys nice and easy one im trying to put some info from a cookie into an access database this is the code i have:

Code:<%dim uiduid=Request.Cookies("tmg_login")("MemberID")sql="INSERT INTO genSiteNews (NewsTitle,News,NewsBy)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("NewsTitle") & "',"sql=sql & "'" & Request.Form("News") & "',"sql=sql & "'" & uid & "')"on error resume nextoconn.Execute sql,recaffectedif err<>0 then Response.Write("Error!")else Response.Write("News Entered Ok!")end ifrs.closeoconn.close%>

comes up with error any ideas?

View Replies


ADVERTISEMENT

Using A Cookie In A Query In FrontPage Database Results

Oct 17, 2004

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??

View 1 Replies View Related

General :: Auto Fill All Requirement Check Boxes Based On What Is Stored In Client Info Table

Jul 1, 2013

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

View 7 Replies View Related

Code For Check Box

Feb 22, 2006

friends,

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.

Is there a way I can do this via code?

Thanks.

View 3 Replies View Related

DAP-Can Someone Check This HTML Code For Me?

Apr 27, 2005

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?

View 1 Replies View Related

Check Box VBA Code In A Form

Feb 17, 2015

I am trying to create form. I have a check box in my form with the name ChkDone.

I am going to write code for this check box and link it with some fields in my form.

The plan is if the check box is true or yes those fields will be available to insert data and if not they will be disabled.

View 3 Replies View Related

How Would I Write This Code For Check Boxes

Mar 15, 2006

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)

End Sub


thanks

View 1 Replies View Related

Code Before Opening Form To Check User's Right

Oct 23, 2005

Hello Gentlemen,

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:

1.Unumber- Autonumber
2.UNames - Text
3.Pwd- Password
4.F1- Yes/No
5.F2- Yes/No
6.F3- Yes/No

F1, F2….stands for form1, form2…

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.

Any idea will be respected.

With kind regards

Ashfaque

View 3 Replies View Related

Modules & VBA :: Check Datatype And Field Size In Code

Feb 6, 2015

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.

View 2 Replies View Related

General :: How To Use Code In Button To Check Relationship Integrity

Aug 2, 2012

Suppose I have two tables:

"State"
"City"

Related to the relationship "one-to-many."

They also have enabled:

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.

View 1 Replies View Related

Update Order Info Based On Quote Info

Nov 7, 2006

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...

Thank you.

View 2 Replies View Related

Modules & VBA :: Code To Check Contents Of A Field In A Table Where Another Field

Sep 11, 2013

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?

View 1 Replies View Related

Forms :: Make Image Appear In Form When There Is Check In Check Box From Table?

Jun 26, 2014

how can i make a image appear in my form when there is a check in the check box from the table?

View 14 Replies View Related

Access Application For Check-in/check-out

Mar 19, 2007

Long time lurker, first time poster.

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).

Can this be done in ACCESS?

Thanks

View 1 Replies View Related

Please Review This Code, (simple Code) New With Codes

Feb 16, 2006

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


End Sub

View 14 Replies View Related

Using Code To Unprotect And Protect Viewing Code

Jan 14, 2007

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.

Thanks

SHADOW

View 6 Replies View Related

Spell Check Contents Works , Need To Suppress The Spell Check Complete Msg Box

Apr 25, 2005

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?

View 2 Replies View Related

Need Info Again

Sep 21, 2005

is there a big diffrence between vba an vb.

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?

View 4 Replies View Related

Need All Info In One Row

Nov 10, 2007

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"));

View 14 Replies View Related

Deletion Of Certain Info Within A Row???

Aug 4, 2005

Hello Gurus,

I need to perform a massive deletion within Access and I want to find out if there is a simple piece of SQL that can be written to complete this task.

Example:

I have a table called GAB - one of the columns is called email addresses

Currently all the email addresses look like this: m14.dpitts@****.com

I need them to look like this: dpitts@****.com, so all I need to do is remove the 'm14.'

Is there something within Access that will accomplish this?? Kinda like substr in Oracle?

Any help would be great!!! :)

View 3 Replies View Related

Info About 'like' Operator From Help

Sep 26, 2005

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?

View 2 Replies View Related

Merge Info

Jan 17, 2006

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.

Travis

View 9 Replies View Related

Info On Recordsets

Nov 21, 2007

Hi All,

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

View 4 Replies View Related

Getting Table Info From Another DB

May 13, 2005

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.

Hope this makes sense.

Cheers guys.

View 3 Replies View Related

Info Gathering

Aug 28, 2007

Hi,

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.

Any help would be gratefully received

Regards

Adrian

View 2 Replies View Related

Last Record Info

Jul 19, 2005

I have a table for Contact history.
All data ca vary except for two fields The ID wich will be multiples of and the election date.

I want to display the last contact info we have how can I do this.

View 2 Replies View Related







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