Form Startup Variable And Inert On New Line

Dec 19, 2006

Hello,

I have a couple of buttons on a form that I am havinga little trouble with.

The first button increments an integer variable which changes the colour of a box dependant upon the value. When a new record is opened I want it to be 0 which sets the colour. So on the form load event I have put Status (variable identifier) = 0.

when a new record is pulled up the box is white, should be a different colour, vbgreen, when I click on the button to increment it changes, so where should I put the declaration so that for each new record the colour is reset to the starting colour.

The other slight problme that I have is that another button inserts the time into a memo field. If I click the button again it just over writes the previous time stamp.

Is there a way to put each new click on a new line? Also I want to preced the time stamp with a a statement like the frist click was at time(). The second click was at time(). So I guess that I need to just increment a var for each click to then wrire 1st click, 2nd click etc. But how do I get the "1st click text/2nd click" text and again where do I put this variable so that it begins at 0 for each new record?

Many thanks.

B

View Replies


ADVERTISEMENT

Forms :: How To Get Values From Line Items Form Inserted Into QUOTE LINE

Jun 5, 2014

I have a main form with 3 sub forms. The main form is tied to a table called QUOTES_MASTER. The first sub form is tied to a table called QUOTE_ LINE_ ITEMS_DIRTGLUE. It calculates the subtotal when selecting items. The relationship is one-to-many linked on QUOTE_ID.

The second sub form adds up total of all line items and is not tied to a table.The third sub form adds ESTIMATED FREIGHT to the PRODUCT TOTAL and is not tied to a table. how to get the values from the line items form inserted into the QUOTE_LINE_ITEMS_DIRTGLUE table as they are added.

I also want to insert the total value from ESTIMATED DELIVERED into the LINE_TOTALS field in the table QUOTES_MASTER.I tried this code on the product total sub form but it doesn't do anything and there are no errors:

Private Sub PROD_SUB_AfterUpdate()
DoCmd.RunSQL "UPDATE QUOTE_LINE_ITEMS_DIRTGLUE SET QUOTE_LINE_ITEMS_DIRTGLUE.SUBTOTAL = Me.PROD_SUB WHERE QUOTES_MASTER.QUOTE_ID = " & Me.QUOTE_ID

View 6 Replies View Related

Startup Form

May 7, 2006

I setup a splashScreen in startup, and I uncheked all check boxes.
Now, as soon as I load database starup form shows, and does
not allow to do any modifications.

Is there any way i can "Undo" or drop splashScreen, and get back
to normal loading of database.
Thank you.

View 3 Replies View Related

Open A Form On Startup

Aug 18, 2006

I've never actually had to do this before so i dont know how! Im sure its really simple.

How would i set the database to automatically open a form when the database loads up?

View 1 Replies View Related

How To Use Startup Form Dynamically

Jun 1, 2005

Hello Guys,
I have proj name m1.mdb which has forms and reports.I have 2 forms form1 ,form2.In form2 I have button that creates new database named m2_date.mdb and creates report and form1 by using property DoCmd.TransferDatabase acExport, "Microsoft Access", sFilename, acForm, "form1", "form1", StructureOnly, StoreLogin,now this form1 has to be seen first when any user doubleclicks m2_user.mdb,so my question is, is there any way i can setup startup form properties dynamically ,without using startup form manually from tool properties of toolbar.
hope to get answer..
thanks
vsap

View 2 Replies View Related

Opening A Form From Startup

Mar 11, 2005

Ok, I have a Forms_Menu that has many command buttons which control other functions of the database. What I want, is when a user opens access to have a page displaying a title, and then the Forms_Menu to open up automatically. Does anyone know how to do this???

View 7 Replies View Related

Startup Form Very Slow Over Network

Jan 16, 2007

Hi guys. I am stumped with a 45 second delay when I startup my application. I get the delay on networked workstations only when another workstation is up showing the Main "switchboard" form. Each workstation has their own copy of VBA (not compiled) with networked versions having linked tables to the server's .mdb

It seems like the workstations know that the main form is up somewhere else and need to negotiate with it. All have the (Access 2000) Default open mode to Shared, Default record locking to No Locks, and Open database using record-level locking On.
:confused:

View 6 Replies View Related

Changing Startup Position Of Form

Sep 3, 2004

I am having a problem with my form. When it opens up, it is maximized, which is what I want. However, the vertical scroll bar on the right does not begin at the top of the form, but towards the bottom. I have to scroll up each time so that I can see the top of my form. Is there a way to make the form startup at the top of the form?

View 1 Replies View Related

How To Startup My Form Only Without Access's Default Form

Apr 19, 2006

I am trying to display only my form on startup.
Tools-Startup allows you to eliminate"Database window" default menu and toolbar but I can't eliminate "Microsoft Access" window.

I don't know if there are other settings that I am not aware of or there has to be code built.

Thanks in advance
Sebastian

View 8 Replies View Related

Startup Form Bypass Security Password

May 19, 2006

Hello,

I have a db that I want to password, so that anyone pressing either F11 or holding shift down at the start, will be prompted with a password.

.....But, I want the user to be able to see the start-up form and associated forms without having to enter a password.

Is this something that is possible to do in Access97?

I have searched the forum for an answer, but can't find anything.

Thanks, Steve.

View 4 Replies View Related

Load Form On Startup In Access 2007

Nov 27, 2006

Hello,

Sorry if this is a really dumb question - I have just started using Access and I couldn't find the answer to this doing a forum search.

I have made a database consisting of a table and a form. All I want to do is get the form to appear automatically when the database is opened. I am using Access 2007.

Many thanks,

Sammy

View 14 Replies View Related

Startup - Open Form In Maximised View

Mar 14, 2007

I bet there is a simple explanation for this.

I have a form which opens automatically when the database is opened, but I want it to open in the maximised view so it takes up the whole screen.

View 1 Replies View Related

Forms :: Error On Startup Due To Display Form

Aug 9, 2013

I have been building a new db in my personal drive at work which has been working perfectly, until I transfer it to the main network drive so that others can use it.When I try to open it, I now get an error saying that windows cannot access the file (code 0x80070002) - although it does in fact open it anway, eventually.

I have removed and re-instated various bits of code, and discovered that it's linked to the 'Display Form' function within Access Options > Current Database, that I have used to open the form 'Homepage' when the db is opened. When the dropdown is set to 'None', the db opens fine, but when a form is selected, the error occurs. I have tried using an AutoExec macro to open the Homepage form, but this generates the same error too.

View 4 Replies View Related

Queries :: Remove GROUP BY Line And Stick Semicolon At End Of Previous Line

Jun 25, 2013

Here's the statement

Code:

sqlfinal = "SELECT Employees.ID, Employees.Name "
sqlfinal = sqlfinal & "FROM ((qryDeptVBA INNER JOIN qrySkillVBA ON qryDeptVBA.ID = qrySkillVBA.ID) "
sqlfinal = sqlfinal & "INNER JOIN Employees ON qryDeptVBA.ID = Employees.ID) "
sqlfinal = sqlfinal & "INNER JOIN qryAreaVBA ON Employees.ID = qryAreaVBA.EmpID "
sqlfinal = sqlfinal & "GROUP BY Employees.ID, Employees.Name;"

If i simply remove the GROUP BY line and stick the semicolon at the end of the previous line (.EmpID; ) it works just fine. How is adding a group by line causing an error?I tried adding another parenthes at the beginning ((( and ending the joins as EmpID); and that failed with the exact same error.

View 12 Replies View Related

Modules & VBA :: Read CSV Transaction File Line By Line And Add Correct Transactions To Access Table

Nov 29, 2014

I have a module which reads a CSV transaction file line by line and adds the correct transactions to an access table and places the wrong ones in a logfile.Now some transactions are rejected twice there is even one rejected six times. Whereas one wrong transaction is processed only once. I am certainly overlooking something obvious in the logic but what. Here is the relevant code.

Code:

Function ImportCSVForConfederation(inputCSV, ORG)
Dim TNO As Integer, TACT As Integer, TABLE As String, TLINE As String, I As Integer, J As Integer, K As Integer
Dim FLD1 As String, FLD2 As String, FLD3 As String, FLD4 As String, LogFile As String, LogPath As String
Dim Lim As String, ITNO As Integer

[code]....

View 8 Replies View Related

Forms :: Splash Screen While Other Form Loads In Background On Startup

Jan 4, 2014

I have on very large form in my db that takes several seconds to load. I want to optimize things, so I am trying to have it load hidden in the background when the db first starts up, this way it can be immediately called on when it is needed later. Please read further :

I want to have a splash screen that loads as well. I have set the splash screen to the default form when the database opens. However, I am not quite sure how to get the other form to load in the background as hidden, AFTER the splash screen opens and appears. I tried calling it with the oncurrent event of the splash screen, but then splash screen wont appear until after the other (hidden) form has finished loading. I have tried different orders of events, but am having no luck getting the desired results.

Summary: I want the splash screen to show first, then the big form to open (hidden) in the background. The user can click on a continue button on the splash screen and then the main switchboard will open.

View 4 Replies View Related

Modules & VBA :: How To Import Text File Line By Line

Nov 18, 2014

I am having a little difficulty with my importing in Access. Every time I import my text file, the lines will be jumbled. I have been reading up and I found this recordset code that seems to be what I need:

Code:
Dim strLine As String
Dim intLineNum As Integer
Dim MyDB As DAO.Database
Dim rst As DAO.Recordset
Open "C:TestTest.txt" For Input As #1
Set MyDB = CurrentDb
Set rst = MyDB.OpenRecordset("tblResults", dbOpenDynaset)
CurrentDb.Execute "DELETE * FROM tblResults", dbFailOnError 'Clear tblResults

[code]....

Basically, this code will extract data from the text file as long as it fulfills the Mid$ criteria. Here's where my problem comes. Each line in my text file is of different lengths and I have to capture the entire line.

I think using the Left$ function would work, but I don't know how to determine the character count such that the entire line of text would be inserted into the table.

Another difference between what I need and the code above is that, I am required to store each line into each row of my table, meaning

Line 1 is placed in Row 1 Column 1
Line 2 is placed in Row 2 Column 1
Line 3 is placed in Row 3 Column 1
.
.
.
Line X is placed in Row X Column 1.

View 14 Replies View Related

Forms :: No Line Only Marker In Line Graph

Oct 18, 2014

I can change multiple things on a line graph with VBA.

Me.Graph47.chartType = GraphType ' take 65 for line
with me.graph47
.SeriesCollection(1).border.Color = vbblue ' change the line color
.SeriesCollection(1).border.Weight = LineWeight ' change the line weight to for example 3
.SeriesCollection(2).MarkerSize = MarkerWeight ' Change the marker weight, for example 4
.SeriesCollection(2).MarkerBackgroundColor = vbblue ' Change the marker color,
.SeriesCollection(2).axisgroup = 2 ' put this series on the secondary axis
end with

SeriesColection(1) is line with markers. This is correct.But now I want the seriescollection(2) without line, so only the markers. I cheched the MSDN site from Microsoft. The Excel trick with the macro does not work for me.how to hide the line with VBA for only SeriesCollection(2) in Access?

View 1 Replies View Related

Reports :: Subform Field Linker Error - Obj Variable Or With Block Variable Not Set

Apr 16, 2013

I am creating a 2 level report to confirm an order. Main report already created, runs successfully called as subform/subreport under "OrderDetails" form. Linked to master using Order.ID. There are two versions of the confirmation report that have different layouts for different program types.

The hangup comes when I try to add a "Class Dates" subreport. It lists dates of individual classes and Skip dates. I have created the subreport as "srClassDates". When I add it to the main report, it lists the records. However, when I try to link it to the Main report, an error message box appears with the "object variable or With block variable not set".

I have tried rebuilding both the main and subreports, rebuilt the query, have not found anything that changes the result.

Linker has been working successfully on other subforms. Report with groupings works fine, but I need data from 2 tables both linked to order.id.

View 2 Replies View Related

Help With Order-line Form PLEASE!

Oct 9, 2006

I am having so much trouble with a order-line form.

I have a table that has the following information.
The Table is Called ORDER LINE:
Its attributes are,
Order No, Product No, Quantity Ordered, line-item cost.

I need the line-item cost to automatically update when someone changes the quantity ordered.
How would I go about doing this?

Now I am pretty new to SQL statements and I am assuming that this is how I would go about doing that.

Can someone please help me?

Thanks so much.

View 2 Replies View Related

Modules & VBA :: Error 91 - Object Variable Or With Block Variable Not Set

Jul 8, 2013

Error 91 - Object variable or With block variable not set

I am getting this error telling me that an object variable is not set.

I know which variable it is but when I step through the debugger it sets the variable and all is fine? Issue is that public variable of a class is not getting set when the VBA Editor is not open?

View 14 Replies View Related

Modules & VBA :: Sorting / Object Variable Or With Block Variable Not Set

Oct 3, 2014

This code runs fine the FIRST time, however trows up a message the SECOND time it is run.

The error is on the line ".Range"

I am trying to sort records which have been exported to Excel.

Dim LR As Integer
LR = 5
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set wbRef = xlApp.Workbooks.Add
With wbRef

wbRef.Activate
.Worksheets("Sheet1").Activate
With ActiveSheet
.Range("A2", .Cells(LR, "O").End(xlUp)).Sort Key1:=.Range("C2"), Order1:=xlAscending, Header:=xlYes
End With
end With

View 3 Replies View Related

Need To Remove Line That Prints From Form...

May 26, 2006

I am creating a form that is a letter. This letter will get printed off a lot. A line at the bottom of the sheet makes it look tacky. I am told this line prints on our other databases also. How do you get rid of it? Our company uses access 97 :mad:

View 6 Replies View Related

Extra Blank Line In Form

May 23, 2006

I have a pop-up form in Continuous Forms mode used to enter notes tied to the id field of my main form.

Two fields - notedate and status. Everytime I click in the blank field "status" another blank record always shows up underneath.

I have "notedate" set to auto fill when the focus is set to "status" and this is creating extra records in my table.

Is there a way to stop this from happening?

"Cycle" set to All Records - changed to Current Record with no difference.


Private Sub status_Click()
If IsNull([notedate]) Then
Me.notedate = date
Me.status.SetFocus
End If
End Sub

Private Sub Form_BeforeInsert(Cancel As Integer)
Me.negid = Forms!OpenContracts!negid
End Sub

Thanks,

Toni

View 4 Replies View Related

Changing Colors For Each Line In Form

Sep 3, 2004

Is there any way to change the color of a field based on the value of a field.

I know how to do this for a single form but I need to do it for a Continuous Form
(each line may be a different value and have a different color.)

Is there some event that happens before each line displays???

Thanks

View 4 Replies View Related

Calculating Line-Item Cost In Form

Oct 11, 2006

I am having trouble calculating a field in a table and on a form.
I have the following Tables
CUSTOMER: Customer No, Name, Address, City, State, Zip, Discount, Phone, Fax, Contact Person.
ORDER: Customer No, Order No, Order-Date, Delivery-Date.
ORDER LINE: Order No, Product No, Quantity Ordered,
line-item-cost
PRODUCT: Product No, Description, Price, Product Image.

I need to calculate the line-item cost and need it to update every time the user enters a new Quantity ordered on the ORDER LINE form.
I know its (Quantity Ordered*Price)-(Price*Discount) and I did this is a query and it worked but I need it to update in the form and update in the table not the query. I have tried everything (Macros, Queries, and Formulas) and I just can not get it to work.
Does anyone know how to do this?
Thanks

View 1 Replies View Related







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