Modules & VBA :: Displays Three Bitmaps Pertaining To Record Being View At Time

Jan 6, 2014

I have cmdButton that opens a form (frmPics) that when it opens it displays three bitmaps pertaining to record being view at the time. Originally I had an embedded macro do this. This is what is listed in the embedded macro:

Code:

OpenForm
Form Name frmPics
View Form
Filter Name
Where Condition = [chid]=[Forms]![all churches F]![CHID]
Data Mode
Window Mode Normal

Wanting to switch to VBA I put in new cmdButton and wrote this code:

Code:
Private Sub cmdPics2_Click()
DoCmd.OpenForm "frmPics"
End Sub

Expecting it to open just the form without the reference to the Id, and then I would study how to write code for a where statement.It still reference the record that I am on. Since I am switching from embedded macro to VBA for the sake of learning VBA I am perplexed by this happening.

View Replies


ADVERTISEMENT

Error Message Displays When Trying To Close The Form/switch To Design View

May 4, 2006

I have a form with a subform in it. On the main form, I have a combo box with a list of program numbers to choose from. Once one is selected, the subform displays all the unpaid invoices under that program number. This part works fine. The problem occurs when I try to close the form, switch to design view, or scroll the subform to the right. Basically, the error message says that the record can't be saved because it would create a duplicate value in the index/primary key. However, this form is used to display information only. I have disabled the edit, delete and addition abilities, so I can't figure out why it thinks I am trying to change or add a new record. Any help would be appreciated.

I figured it might make things easier if I included a copy of the database, so here it is.

The form is called SETR, and the subform is AllInfo subform.

View 1 Replies View Related

Total Time Query Displays Incorrect Value

Feb 16, 2007

Hi,
I am using

Total_Time: Format([totaltime_mins]/60,"00") & ":" & Format([Totaltime_mins] Mod 60,"00")

To display the time as hours and minutes but this formula doesn't always work correctly.

for instance if the totaltime_mins = 90 then total_time is displayed as 2:30

also if totaltime_mins = 40 then thotal_time is displayed as 1:40

does anybody know why this is not working correctly ?


kind regards,
jamie

View 2 Replies View Related

Record Displays In Row When There Is No Data?

Mar 18, 2005

I have a form that contains 4 sub-forms. In two of the Sub-Forms "Users" and "Computers" the form displays the PK on the second row when there is NO Data? (See attached).

Does anybody know how I can stop this from displaying?

Many Thanks,
Phil.

View 5 Replies View Related

Sub Form Displays Master Record

Sep 26, 2006

Hello I have a small problem that seems weird. I have a form which displays a subform with all correspondending jobs for one individual. The problem is the sub form displays the main form information with the other jobs. Im trying to stop the subform from displaying the current mainform's job information. So it won't look like there are more then 1 of the same jobs to other individuals. Can someone help me with the correct method to stopping this. Thanking you in advance,

View 1 Replies View Related

Queries :: Column From Other Table Displays Default Value Even With No Matching Record?

Apr 7, 2014

I have three tables: First, Second, and Third.The tables Second and Third each have a column with a default value of "X".I'm creating a query that selects fields from First table that JOIN with corresponding fields from Second and Third, so that all records from First are represented and only matching records from Second and Thirdare returned. I also select the "X" fields from Second and Third.

So I run the query: and the "X" column from Second only displays "X" for records that have a match in Second (since I mean for these fields to be quick indicators for if the record also appears in the other tables, this is my ideal result). However, the "X" column from Thirddisplays "X" for all rows, regardless of whether the record has a match in Third or not.

I can get more specific if need be, but I really can't tell why the one is displaying according to matching records but the other is always on. The JOINs are set correctly and the properties for the columns all check out.

View 4 Replies View Related

Modules & VBA :: View Main Modal Form Based On Chosen Subform Record

Jul 22, 2014

I have a modal form which has a single record which is then linked to a sub-form on the same modal form. This all works fine and shows the relevant record and sub records but I want the modal form main record to change dependant on the record selected in the subform (which is basically order item history.

I found some code on another site which seemed to work for others but for me I am getting Run-time error 2465 and it doesn't like my reference to 'Me' - is this because it is a modal form?The code I am using is:

Public Function GotoRecord(RecordID As Long)
Dim rst As DAO.Recordset
Dim strCriteria As String
Set rst = Me.RecordsetClone
strCriteria = "ID = " & RecordID
rst.FindFirst strCriteria
If rst.NoMatch = False Then
Me.Bookmark = rst.Bookmark

[code]....

View 1 Replies View Related

Modules & VBA :: Can't Get Data Entry Form To Add New Record After First Time

Aug 6, 2013

I've got a data entry form bound to one table. The form has four buttons:

- Clear Fields
- Cancel
- Save and exit
- Save and add another (which should save the user input to the subform/table, clear the input fields, and allow the user to add another record)

I can't quite seem to get the "Save and add another" button to work. When I put some information in the input fields and click the button, it saves it to the subform/table perfectly, but when I try to do it again, it just edits the last record (the one just created).

How can I get that button to place the information from the input fields in a new record every time?

The _Click event for the button looks like this:

Code:
If Len(Me.field1 & Me.field2 & Me.field3) > 0 Then
Me.Refresh
btnClear_Click
DoCmd.Save
End If

View 5 Replies View Related

Modules & VBA :: Run-time Error 3021 While Updating Existing Record In DAO Recordset

Jun 16, 2014

I have a linked table to a DB2 database. this table contains key-pair values and has about 140k records.

I use a Sub to update the value of a specific record.

The sub starts by opening the needed DAO recordset
Then it uses the rs.Findfirst method
It checks if rs.Nomatch is not true (so the records exists!)
Then it starts updating the record with
rs.edit
rs!value1 = myvalue1,
rs!value2 = myvalue 2
rs.Update
There is where I get the '3021 No current record' error

I use the same sub on the same table to update to different parts. One part works the other gives me the error.

I have checked for typos.

View 5 Replies View Related

Time Taken To View A Form

May 19, 2006

I'm attempting to create a short questionnaire. I have 1 table with 5 multiple choice questions, each one to be answered singly through a form.

My problem is I would like to know how long each participant takes to answer each question, therefore I am trying to save the time (StartTime) from when a form is opened to the time (EndTime) when the next question button is pressed and then again for the following form/question etc.

I have tried to do this through the use of Macros on the Form using the Set Value Action to populate the value/time in the Table - without any success - it does not like using the Time () command through a Form! why??

How can I get the above to work?

If there is no easy way to do this I would like a counter to start when the first Form is open and finish (wherever Form may be open) after 90 seconds (e.g. a user has 90 seconds to go through as many questions/forms as possible) before the questionnaire closes and goes back to the first form.

Any advice would be gratefully accepted.

Thank you for your time.

View 1 Replies View Related

Run Time Error In Datasheet View

May 4, 2005

Hi all - I am getting a runtime error when changing a form from form view to datasheet view. The reason it's happening is that I have code in the OnCurrent of the form which populates a text box with information calculated from subforms on the main form. Obviously, with the form in datasheet view, the subform is not there, hence the error.

Any ideas on how I can stop this error from happening?

Cheers

Chris

View 1 Replies View Related

Reports :: View One Record From Master Table And Many Record From Slave Tables

Dec 23, 2013

I have got problem with ms access report. I want to make a report which is based on

1) first master table
2) first slave table
3) second slave table

I have done some research and decided to do some form with subform. So I have got the view one record from master table and many record from slave tables in one view.

But it turned out that it has become duplicate records. (the relationship are ok - it duplicate master record as many as slave records)

So:
1) how i can do ms access report from multiple tables - one master record with multiple records form slaves tables

View 5 Replies View Related

Modules & VBA :: Calculating Elapsed Time Within Time Period

Dec 1, 2013

I have a working dB which can calculate a shift duration and sum total all shifts worked within a period for the purpose of producing a labor report for payroll. I have successfully used the DateDiff function and converted the minutes to HH:MM on my form and reports. Now I want to calculate elapsed time for a specific period within a shift, I'll call it OtherHours and I am aiming to calculate a portion of time that meet the following conditions below. I am using field names of [PunchIn] and [PunchOut] and both are of type General Date.

IF [PunchOut] ISNOT Saturday,Sunday
EXIT FUNCTION
ELSE
IF [PunchOut] ISNOT Between Midnight and 0559 hours
EXIT FUNCTION
ELSE
DATEDIFF ("n", <MIDNIGHT>, [PunchOut])

My thoughts are to solve the DateDiff portion and then figure out how to apply the conditions within the IF statements.

View 4 Replies View Related

Multiple Record View

Sep 19, 2005

I'm new to Access and need some help. I'm trying to duplicate a Lotus Notes view using Access. That is, I want to display multiple records of the database, similar to the datasheet view, but only certain fields of the database and filtered. When the user clicks on the record they want to display or edit, the single document form will display for that record. Is this doable in MS Access? Any help is appreciated.

View 4 Replies View Related

Does MS Access Report Support Hide/Show Fields At The Report View Time?

Aug 19, 2007

Does the MS Access Report support Hide/Show specific fields according to parameters or even by click?

View 3 Replies View Related

Prior Record In Datasheet View

Mar 1, 2007

In my db I am tracking different stages for an event. I have a subform that is in datasheet view. The last field (current) is a yes/no check box that says that this entry is the current stage of the process. In one of the fields I have a afterupdate event that says me.current = true. But what I need is to change the previous entry to show that stage's current to be false.Does that make sense?Date Event Location Current02/01/07 Drying Dryer X (when next event added this =false)02/05/07 Bagged Warehouse XUp until I enter the 02/05 entry the 02/01 entry was the current stage and I want a check in the current box. But when I enter the 02/05 entry that now becomes my current stage so on the 02/01 event then current = false and on the 02/05 event current = True. I can get the 02/05 event to show current = True but how do I make the 02/01 current =False?Thanks,Rick

View 4 Replies View Related

View Current Record On A Report

Apr 19, 2006

I have a report which shows all the records in my database. I have a command button on my form which brings up that report for preview.

How can I get the button to bring up that report showing only the current record being viewed on the form?

Do I need a separate report and what criteria/VB code is required?

View 1 Replies View Related

Select Record Based On The Time Of Another Record

Apr 5, 2007

hi guys,

some background on my data:

i have a table that holds Electronic Gift Card details (those plastic store gift voucher cards). it holds all details of every transaction for every card, so the card number, activations, redemptions, dates, times, transaction values etc. are all recorded in my table.

i have attached a small extraction in a spreadsheet.

a single gift card can have multiple transactions against it throughout its lifespan. there are sometimes error transactions, and i need to write a query that finds these error transactions (they are all flagged with a "1" in the [reversal flag] field, so that bit is easy) but then also then the next transaction that occurs on that card. this subsequent transaction will not be flagged with a "1", but is a reversal of the error and will have an "802" flag in the [transaction type] field.

each transaction is date stamped hh:mm:ss, but i don't know how to write a query that will

1) find gift card number that has a reversal code of "1"
2) find next transaction made on that gift card based on transaction time
3) check that subsequent transaction type is "802"
4) select both transactions
5) repeat for entire table

i can't seem to get the desired result just using a straightforward query, and i don't know much (or any!) VBA in access.

does that make any sense at all???

cheers
bazzason

View 7 Replies View Related

Jumping To Form View Record From A Query

Apr 10, 2007

Hi, new to the forum hoping someone can help :)

I'm half way through a project and want to have 3 queries to search personal information (Surname/DOB/Ref Number) is it possible to select the record in data view from the query search and jump to the record in form view? Would I have to display the query differently or is it possible to just click within the normal query view?

Any help would be appreciated, thanks Harry

View 1 Replies View Related

Record Navigating In The Form View Question

Oct 4, 2005

Hi, Sorry noob here with a noob question... I built my first database for my work, and I want buttons that can navigate through the records on the form view, but I want them to be like A,B,C,D etc... When I click the button I want it to go to the first last name in the record of that letter of alphabit.... I know it can be done because at my previous employment they had that feature. Please help... I can't figure this out... :confused: Also, how do I import IMT forms into an access database???

View 1 Replies View Related

Hide Record Selector In Datasheet View

May 25, 2006

Hi
Can anyone confirm (or otherwise) that you can't set the record selector property to 'no' in a datasheet view form? (well, you can set it to 'no' but it seems to have no effect)

cheers
Neil

View 1 Replies View Related

Query Opening In Report, Not Record View?

Feb 5, 2007

I have a query that searched thru records based on a person's last name. It runs fine and returns the results I want. However, the view of the results is in record-view. I'd like the results to be in a report format. Is this possible? The macro that calls the query is set to display in report view, but the query always come back showing the records. What am I missing here? Thanks a ton for your time!

James

View 1 Replies View Related

Forms :: Splitform View - No Record Selected

Mar 7, 2013

Access 2010

I have a bound form (splitform view) with the code

"DoCmd.GoToRecord , , acLast"

on the Form_Open event. When I open the form it does go to the last record and shows all the data that are in (some of the) fields. I cannot however manipulate the record until I click on the navigation buttons in the bottom of the form. It also doesn't show which record ("34 of 34" for example) is selected.

How I can get it to open the last record and let me manipulate it directly on open?

View 4 Replies View Related

Forms :: Setting New Record View As Default?

Oct 28, 2014

How to set a new record view as default in form view???

View 1 Replies View Related

Queries :: Return Record In Datasheet View

May 21, 2013

I have a query that returns records in datasheet view. I need a field to accept the user selection from a drop down, then save that to a table. The query is based on a couple queries and one of those queries is based on the table i need to save the user input into. When i make a selection from the drop down list it puts the selection in that field for all the records and then doesn't save.

View 1 Replies View Related

Starting Datasheet View At Selected Record

Oct 13, 2011

I have a simple form in datasheet view in Company Name sequence. By default it starts the list at the beginning. I would like to put a combo box in the form header that pulls down the companies to allow the user to select the starting company to list. I don't want to go directly to the selected company, I just want the list to populate starting with the selected company. I can create the combo box and I know I use the After Update event to get the selected value, but how do I restart the list. Ideally, I would still like the operator to be able to scroll up and down after the list is redisplayed starting with the selected company.

View 2 Replies View Related







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