Search results

  1. S

    Listbox refresh problem?

    Hi all, A solution to my problem described above is as follows. While it does not work perfectly, it does work. A simple piece of code using a global boolean variable - If gblEnqDesc = False Then gblEnqDesc = True Exit Sub Else gblEnqDesc = False DoCmd.OpenForm "frmEnqDetails" End If This is...
  2. S

    Listbox refresh problem?

    Hi gemma-the-husky, Thanks for the response. I did some tests on it earlier just using a msgbox and figured out that the problem did definately relate to the timing of when the event is called. I have moved the event to a 'Preview' label so the mousedown event now works without issue, as the...
  3. S

    Listbox refresh problem?

    Bump. I am still desperately in need of assistance with this problem. I have attached JPGs to provide a better idea of what is happening. As you can see in the second JPG - the form that opens is clearly displaying the ID number of the first entry in the listbox, even though the second entry...
  4. S

    Help with ADO - if record not found...then

    Thanks Bob! This worked like a treat and I agree is a much more efficient way of achieving the result. I had to make a minor change to the strSQL statement - strSQL = "SELECT * FROM tblMissingPayment WHERE ID = " & EnquiryNumber & ";" Not sure if the semi-colon on the end is required - but I...
  5. S

    Help with query expression

    Hi all, I am in dire need of help building an expression in query. The query looks for potential duplicate customers by query tblCustomers against two fields [MDL] and [MVL]. Basically, what I want to achieve is - - If txtMDL = [MDL] OR txtMVL = [MVL] select the record in the query - If...
  6. S

    Help with ADO - if record not found...then

    Hi all, Should be a simple one. I have the following code that finds a record in a table, and deletes it (only if the 'Deleted' condition is true) - If Deleted = True Then strCriteria = "[ID] = " & EnquiryNumber Set ADOrs = New ADODB.Recordset ADOrs.ActiveConnection =...
  7. S

    How to declare this variable

    Hi all, EDITED... My OnClick event for a number of textboxes (when entering customer info in an unbound form) attempts to position the cursor - Dim ctlCurrentControl As Control Dim MyCtrl As String Set ctlCurrentControl = Screen.ActiveControl MyCtrl = ctlCurrentControl.Name 'Textbox is...
  8. S

    Listbox refresh problem?

    Hi all, This may be a tricky one. I have a listbox (lstResults) with a mouse down event that opens a form. Mouseup closes the form and double click opens yet another form. This serves to allow the user to 'preview' information related to the selected listbox row - prior to opening the record...
  9. S

    Expanding Form

    Thank you Oldsoftboss! Your form animations DB is exactly the sort of thing I am looking for. I will take a closer look and see if I can understand how it works :P Thanks again, Robert
  10. S

    Expanding Form

    Hi all, I am trying to add some more professional touches to a DB to get away from the whole '8-bit' feel that Access seems to have. I would like to have a form that displays information and pops-up during a mouse over event. This is no problem. What I am trying to achieve is an effect - that...
  11. S

    Working with listboxes

    Hi all, Hopefully a simple one. I have a hidden listbox (lstDupCus) on my form that is used for validation purposes. 'lstDupCus' is populated based on a query and would typically have nothing in it. I am having trouble handling values in the list box and was hoping someone could provide me...
  12. S

    Login Form + Code

    I use a login page in a few of my DB's. This is my method - Uses controls 'txtPassword' and 'cboEmployee' to verify name and password. It may help. If Me.txtPassword.Value = DLookup("Password", "tblEmployees", "[Employee_No]=" & Me.cboEmployee.Value) Then 'Password ok, do something...
  13. S

    Type Mismatch Error - Please help :(

    Hi, Just on the note of posting back - I'm sure there are other newbie's like me out there. I also made reference to a Runtime 91 error - and have also resolved that problem. The error was occurring when I tried to do anything with my textbox controls - either write using SQL, or perform a...
  14. S

    Dealing with Null values in math expressions

    Sorry to post....I have the answer.... I am using IIf(Value Is Null,0,Value) Cheers Rob EDIT...Thanks MStef...will also try that as it will make things alot simpler :)
  15. S

    Dealing with Null values in math expressions

    Hi all, I am in desperate need of some advice. Today I set to work building some math functions in my queries to calculate delays/turnaround times for work, etc. I have found that where there are null values in my table - the calculation seems to break down. Let me explain... In it's...
  16. S

    Hide/disable record info at bottom of form

    Hi, Finally one that I can answer :P Simply open your form in design view. Right click the form and go into the Form Properties. In there you will find an option called 'Navigation Buttons'. Turn this off...and all fixed :) Regards Rob
  17. S

    Help with logic to fill listbox

    Hi there, I am struggling with the logic behind populating a listbox. The variables are based on checkbox selections from another form. I have a number of variables A,B,C,D,E,F,G,H. For each variable that equals -1, I would like to populate the listbox with a string that I determine. eg. If...
  18. S

    Why do I get an error?

    Hi all, Not a problem - but seeking answers to why an error occurs. Here is a snippet of my code - Private Sub lstResults_DblClick(Cancel As Integer) Dim Start As Date Start = DLookup("Date_Commenced", "tblEnquiries", "[ID]=" & Me.lstResults.Value) If IsNull(Start) Then strSQL = "UPDATE...
  19. S

    Dazed and Confused....Query Criteria with VBA

    Hi Keith, Sorry if my original post was not clear :( The listbox on my form looks up values based on a query. The listbox also displays multiple values on each row. For instance, lets say my query is based on 'First Name' and 'Surname'. Both values are displayed in the listbox. ie...
  20. S

    Dazed and Confused....Query Criteria with VBA

    Hi all, I am lost and in need of help. I have designed a form with a basic search function. It uses the method in the simple search example in this forum. Basically, a listbox containing the values, requeries based on a textbox string. Using - Like "*" & Control & "*" I want to expand this...
Back
Top Bottom