Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS ACCESS






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Update After Lost Focus


I have a form with a combo box for the user to select a specific date. I need to update the date field after the combo box loses focus instead of on the change of a record.

Can someone provide me the vb code that will update the field when the focus is lost?

Thanks for your help,

Jeff


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Got/lost Focus Help Please
Hi there.

I have a form and on open it traps the user into a combo box where an option must be selected before they can move to another field. I did this by using the lost focus event of the combo to check if an option has been selected and then return the cursor to the combo if no selection has been made.

The problem is that there is an exit button on the form which the user must be able to use to exit the form without interacting with it, say if they opened the form by mistake and just wanted to exit immediately.

I cant find a way to trap users into selecting an option from the combo before filling the rest of the form while still allowing the exit button to work. At the minute you still have to select an option in the combo even if you just want to exit the form.

I have been a notes developer for years so Iím still not that familiar with access and the way its events work so this could easily be a gormless question. Feel free to point that out. Any comments would be much appreciated.

View Replies !   View Related
On Lost Focus....check To See If Primary Key Exists
Hi there

I recently have been given a database to get into shape.

One of the main problems is that when a person enters data into a form, They until the leave the form are not aware if the primary key has been used before.


Let me try explain.

I have a booking number (which I have only in the last couple of days made a primary key and also changed it so there can be no duplicates)

I have changed the form around alittle so that the person entering the new data must start with entering the booking number.

How can I make a piece of code that once the booking number textbox loses its focus the code then checks the table to see if that booking number exists. I would like for the person to establish that they need to enter a new booking number before getting to the end before seeing that the booking number already exists.

I hope I am making some sense.


TIA

View Replies !   View Related
Hide Command Button On Lost Focus
Seems simple, but I haven't been able to crack this one.

I've searched and haven't found an obvious answer.

I want to hide a command button after it loses focus. I've tried placing this code on the On Lost Focus and On Exit events of the command button.

Me.cmdName.Visible = False

I get the 2165 error, 'Can't hide a control that has a focus'.

I guess one solution would be to force the focus to another control first, however, "how do I know what control the user is attempting to move the focus to?"

View Replies !   View Related
New Recordset's Memo Field Data Lost On Update
morning

i am adding a new row to an adodb.recordset, one of the fields being a Memo datatype.

all the other fields will write to the database fine, but with the memo, it will mysteriously disappear when i call rs.update

response.write(rs("my_memo_field")) 'give correct output
rs.update
response.write(rs("my_memo_field")) 'gives nothing!

any one else had this happen and have a solution?


cheers

View Replies !   View Related
Lost A Dll?
i have just had a problem

if i try to edit an open form by clicking the design icon, i get a message

cant find the call back function or macro "fdesign". ican still close the form and open it from the dbs window

this is affecting accessXP and access20003, but not A97

ive tried repairing/reinstalling the XP installation (but not the 2003 yet), but this has not fixed it.

Any thoughts?

View Replies !   View Related
I'm Lost
I have a table and it has:

namefield
surnamefield
state1
state2
state3
match(Y or No)
importDate


I would like to make a query+ report so that in the report it looks like this:

<<Name>> <<Surname>>
<<state1>> <match>
<<state2>> <match>
<<state3>> <match>

in one line, at the moment I made a query and the name shows 3 times...

can anyone here give me some hints how to show the name once + the match. Thanks in advance

Cheers...

View Replies !   View Related
Lost And Need HELP!
I am new to using MS Access and am already frustrated that a simple task is getting the better of me.

My situation is that I work for a company that has a number of reps, which are allocated their own ticket books(block). Each book is 50 tickets in size i.e say from number 320500 to 320549. All tickets are entered through our internal system for whatever the ticket was used for.

Now here is my problem. Each block is registered to an individual rep which we need to keep record of as to which tickets are allocated to them, other then having to enter each ticket individually into our ticket block records system, I am trying to make a database entry that accepts the reps name, ticket block start number and then automatically adds the next 50 tickets to that rep, so when we use a search field on any ticket it displays the rep that the ticket was allocated too.

In my head i'm looking for the MS Access way of doing the following:
[tickblockstart]+1 until [ticketblockstart] = [ticketblockstart]+50

Can anyone help me with this probably very easy problem, that i can not seem to grasp at the present time.

Regards

2rsGarry

View Replies !   View Related
Im Lost!
hiya, im trying to create a button my form that will move all 'finished' records from where they presently are, to another table.
the button does work, it moves the records into the 'new' table, however it does not DELETE them from the table i moved them from, so now the records are stored in two tables??

the code i have is as follows:
SELECT * INTO Table2
FROM Table1
WHERE Finished='Yes';

if there is something different that i should be doing, or a better way to do this move, please let me know.

(also if this is in the wrong section feel free to move it)

thanks!

View Replies !   View Related
I've Lost Myself
:confused: Fingers crossed I'll get some direction to resolve an issue that I can't even begin to imagine how to search for.My database is used to record detailed work done with clients who are receiving regular support. I'm designing it around a Common Assessment Support Framework that I have no choice but to follow, except for some minor points. There is the potential for approximately 40 different assessments for each client and therefore a lot of duplication in personal details.So far this forum has been a great help and I have learned a lot from those who volunteer their time to those of us who need it from time to time.Following the numerous examples of normalisation posts I have attempted to ensure there is no duplication of information across tables. I've come to a point however where I am stuck:The end result of what I am trying to do is create an individual report called Needs Assessment Planning Tool - rptNAPT.The report will be populated from the fields in qryNAPT that is made up from tblIA1 and tblIA2tblIA1 consists of 17 x 'area of need' that is broken down in to 5 elements: 'Now - Y/N', 'Later - Y/N', 'User Level - Number', 'Worker Level - Number' and 'Disagreement - Memo'. These fields are entered by using frmIA1, and these fields are entered by using frmIA2.So, now I have to enter data in to another form; frmNAPT that includes both theseand thesefields. I only need to show the area of need where Now is True in the form and the subsequent report; rptNAPT.My thoughts about this are (please don't laugh) in the form frmNAPT the 'Area of Need' because in the table there are 17 different areas e.g. Accommodation (improvement), Homelessness, DomesticViolence etc will need to be unbound and in some way filtered to show only those area of need where fldNow is True? and fldUserLevel is NotNull or doesn't equal zero. I will need a minimum of five such fields to show the Areas of Need that the Client and Worker may elect to work on.Sorry for the long post but I'd really appreciate some direction on this, even if it is only to point me in the direction of a link that can be helpful.RegardsDoug

View Replies !   View Related
Set Focus Nothing?
I have several forms and subforms that display data, but are not used for data entry. The first textbox on every form gets the focus on open. I'm sure I've seen some way to open the form with no focus on any control!

Can someone help me remember?

Thanks,

Sup

View Replies !   View Related
Get Focus
thanks for helping.

how do i get a record to get focus when a form opens or a button is clicked on?

thanks again

View Replies !   View Related
Set Focus
I am having trouble getting the cursor to change focus after updating a field in my tab control subforms. I have a main form with a tab control and 4 related subforms for each record in the main form.

I have a calendar that pops up with the On Click of my Date field. When the date is selected, it enters it into the field and the calendar closes. For some reason though the user cannot simply go to the next record with the mouse and has to tab to or select another field in the same record first and then click on the Date field in the next record.

I have tried SetFocus to "Hours" (the next field after "Date")and "NextRecord" on every Event I can think of but it does nothing, it just stays on the changed field and the only way to get out of it is to go to another field. I've tried saving, requery, etc. I've also tried the options shown in the forum with no luck and using different events associated with the Calendar form - On Close, Lost Focus, etc.

Any suggestions? Thanks

View Replies !   View Related
Which Tab Has Focus
I have a form that has 9 tab pages. I have an amend button in the form footer that will do a different thing depending on which tab has the focus. How can I find out which tab has got the focus when I click the Amend button?

View Replies !   View Related
Could Not Set Focus
Hi

I have a problem with setting focus to a text box. There is a listview on the form. Double clicking on a row will search the database for that record using SNo field and then display the contents on the respective control. When I click on a row the first time, it works. Clicking on the second row immediately gives the error "error 2110 - Access cannot set focus to the control txtReference.
Here is the code.......
Private Sub lvwOrders_DblClick()
ClearAll
Set rs = New ADODB.Recordset



rs.Open "SELECT * FROM tblOrderEntry where sno=" & ListView.SelectedItem, con, adOpenKeyset, adLockPessimistic
lblFooter.Caption = "Edit Record"

subRetrieve

End Sub



Private Sub subRetrieve()
Form_OrderEntry.SetFocus
With rs
For i = 0 To lstCostCenter.ListCount - 1
If lstCostCenter.ItemData(i) = !CostCenter Then
lstCostCenter.Selected(i) = True
Exit For
End If
Next i

txtReference.SetFocus
txtReference.Text = !ReferenceNo

txtOrderNumber.SetFocus
txtOrderNumber.Text = !OrderNo

For i = 0 To lstCostCenter.ListCount - 1
If lstCostCenter.ItemData(i) = !CostCenter Then
lstCostCenter.Selected(i) = True
Exit For
End If
Next i

For i = 0 To lstDescription.ListCount - 1
If lstDescription.ItemData(i) = !Description Then
lstDescription.Selected(i) = True
Exit For
End If
Next i

For i = 0 To lstOrderStatus.ListCount - 1
If lstOrderStatus.ItemData(i) = !OrderStatus Then
lstOrderStatus.Selected(i) = True
Exit For
End If
Next i


For i = 0 To lstSalesRep.ListCount - 1
If lstSalesRep.ItemData(i) = !SalesRep Then
lstSalesRep.Selected(i) = True
Exit For
End If
Next i

For i = 0 To lstPaymentMethod.ListCount - 1
If lstPaymentMethod.ItemData(i) = !PaymentMethod Then
lstPaymentMethod.Selected(i) = True
Exit For
End If
Next i

For i = 0 To lstCallType.ListCount - 1
If lstCallType.ItemData(i) = !TypeofCall Then
lstCallType.Selected(i) = True
Exit For
End If
Next i

For i = 0 To lstStatus.ListCount - 1
If lstStatus.ItemData(i) = !Status Then
lstStatus.Selected(i) = True
Exit For
End If
Next i

If !Status = "Pending" Then
txtReasons.Visible = True
lstAssign_Reasons.Visible = False
txtReasons.SetFocus
txtReasons.Text = !Reason
ElseIf !Status = "Assign" Then
lstAssign_Reasons.Visible = True
cmdSave.SetFocus
txtReasons.Visible = False
For i = 0 To lstAssign_Reasons.ListCount - 1
If lstAssign_Reasons.ItemData(i) = !Reason Then
lstAssign_Reasons.Selected(i) = True
Exit For
End If
Next i
End If


End With
End Sub

What can be going wrong ?

View Replies !   View Related
Lost Passwords
I created a DB in an old PC of mine for a customer. I set passwords for user accounts to prevent users from accessing the design etc. I bought a new PC lately and I want to open the DB to work in it but I get an error saying that I do not have the rights. I suppose I need to create the same accounts in my new PC as in the old one but I don't remember the username or password that I was using back then. Any Ideas???

View Replies !   View Related
Lost MDB File
We have lost an MDB file. Is there a log file where command calls to Access are stored so we can try and recreate the database?

View Replies !   View Related
Lost In My Database...
My database queries, tables, and reports is growing. Is there a function/utility that will show me for a particular report what queries, and tables that are used to gather the data that populates the report?
Thanks!
Gunner...:confused:

View Replies !   View Related
Lost My Menu Bar
Greetings,

I have just opened Access and for some reason my menu bar is gone. I have fiddled for a few minutes try to find and restore it - but I am clueless. It is working fine in all other programs.

How do I restore it?

~rbinder

View Replies !   View Related
Lost On Security
I'm completely lost on how to get started on security. After reading all these postings I'm more lost then ever. What is a backend and frontend security? How do you create password for each users? etc...

Please help!

FYI I'm using Access 2003

View Replies !   View Related
Lost Data
I found the problem below was caused by when doing a select in a form I used opendatabase for the set of the database object and not currentdb. I just donot understand why when I was trying to teach myself VBA that their are examples, in help, that donot work properly. I would never encounted this problem if I stayed local on my workstation.


This is the first time I am posting a problem. I am a new VBA programmer and I have developed a database for collecting payroll info. I am running on a XP sp2 workstation running office 2003. Things were going well until I decided to move the mdb file off my workstaion and onto a fileserver(windows 2003). At first it seemed to be working and then when I know I just added new records to a table I could not select them. I looked in the table and the records were there. I later found that when I did a select in a form I could not find the records, but if I used a query the records came up(same exact select). This happens to all tables that get updated daily. To make things worse sometimes after an update all is fine. Any Help!!!!

View Replies !   View Related
URGENT ... Help Me I'm About To Be Lost
Good morning friends

My database, I don't know what happend to it.
I'm trying to open it but it gives me a message:
"The form name 'Welcome Screen' is misspelled or refers to a form that dosen't exist' If the the invalid form name is in a macro, an Action Failed dialog box will display the macro name and the macro's arguments after you click OK. Open the Macro window, and enter the correct form name."
and then after I click ok it open the database but it doesn't show my forms, Reports, Macros or Modules that I have created before.

what does it mean, may I lost all my previous work and data ??? :(:(:(

Please I'm waiting you ... I'm about to lose my mind

View Replies !   View Related
Completly Lost
I have been trying to figure out comboboxes and lookup tables on and off for two weeks now and am completly lost. I have read the tutorial on cascading combos. I have downloaded and studied the the autofill db example from Pat Hartman. I have searched and read the threads and am still having a problem. I have several lookup tables. I will use one as example. This a database for my lawfirm. We get a lot of referrals from other attorneys. I have a lookup table with the name, address and phone of all attorneys. I have a combobox on my clientinfo form that looks up the atty info . I put the attorneyid field in my clientinfo table as FK and linked my clientinfo table to the attorney table thru this field. All this did was generate an error message that I could not save my record because there was no corresponding Atty record. I know this should be so simple. Can someone please help me? What do I with data I have lokked yup from a lookup table and how do I link it to the tables that will need it later on? Thank you in advance.

View Replies !   View Related
I'm Completely Lost!
Good afternoon all,

Really struggling with my structure and have been looking at it for so long my head hurts so any advice would be great. (see attached)

Basically, I want a DB for keeping track of service / repair of electronic machines. Many of our customers also call us for tech support. There are a number of other items like purchases but once I have worked out one, I can then copy the methods.

Are my relationships even remotely correct?
I cannot get the calls log to work - loosly based on the sample a supplied with Access "contact managment".
:confused:
Any help / advise would be greatly received

View Replies !   View Related
Lost With Query
Hi All

I hope someout there can help me. I work with a youth group and look after to uniform stores.

I am make a DB to book out and booking, I have manage to make all the tables, Forms and some queries, but when I want to make query that take number of item Issued and number of item returned and give me total in stock, I can get to work with Issue or Return by them using by themself

this what sort of line I am using.

Total in Stock=openingBalance-qtyissue+outingbalance.

opening bal issued return
10 2 5 total in stock 13

View Replies !   View Related
Query... A Little Lost
I have 5 forms and 5 tables.

The database is blank, but the information entered into the forms are saved into the tables.

Now I want to make a query so I can see some statistics regarding the information entered into the forms and stored in the tables.

I have created a query, but Im not sure what to do next, do I connect it to the query and it should give me desired output or do I connect the form to the table
or how does it work ?

need some feedback Im a little bit lost in this :(
regards
Frodo

View Replies !   View Related
Lost Query ?
I recently moved by database from one hard drive to another - all is working ok after refreshing the links. However I have a few queries and reports that are date or date/time specific. (ie; I input a specific start / end date or start/end hour) Now when I run these queries it returns an error message stating 'Data type mismatch in criteria expression'

Please does anyone know why and how can I restore the queries ? Prior to the move all queries / reports worked OK.

Best Wishes

Richard

View Replies !   View Related
Lost My Switchboard
I have a switchboard in a database, and probably made some edits to it along the way. I don't even recall, now. Anyway, when I try to use the 'Switchboard Manager' now, it doesn't even list my switchboard as one of the options. My only choice is to start another one.

Is there a way to register a form as a switchboard, after the manager drops it?

Thanks,

Matt

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved