Search results

  1. W

    Loop through specific controls

    Thank you all for your replied. It has helped me to figure out the code i needed to get the required 'Description'. I think the code I ended up with is a Frankenstein of both sets of code provided haha. Would not of figured out without you guys. Thank you again :)
  2. W

    Loop through specific controls

    Hi all, Not sure how to do this but i think i first need to find out how to loop though specific controls on my form. Basically i am trying to produce the description that our company uses for a working pattern. Basically the description starts with the total hours for the week followed by...
  3. W

    Please help with NZ being ignored.

    Edited the above because i found that some Locations was not there. After reading all the above about NULL's and 0 Length String's i tried the following code and it now seems to be working. SELECT table_MainData.*, IIf(IsNull([structure lvl5]) Or [structure lvl5]="",[structure...
  4. W

    Please help with NZ being ignored.

    Yes i can confirm this is correct. The first query is fine, its when i create the second query when things start going weird. EDIT: Appears the result were not all there in Location.
  5. W

    Please help with NZ being ignored.

    Hi all, I have the below in a query to select my required data. SELECT table_MainData.*, Nz([Structure lvl5],[Structure lvl4])) AS Location FROM table_MainData; When i check the data in Datasheet View it looks fine, there is NO blanks in the Location field. But if i export to excel the NZ...
  6. W

    FindFirst - Top of SubForm?

    Hi all, Users open a record from 1 of 2 SubForms (sForm_DetailsOpen/sForm_DetailsClosed). They click the ID and it opens the data in another form. When they Save and Close the record I use the below code to Requery the Subform and to go back to the record that was selected before the requery...
  7. W

    Pass through query to table? (Suggestions)

    EDIT: My VBA code that filters the subform was changing the subform datasource back to the HUGE query again. Not the smaller one created above. Once i change this to look at the smaller pass through query it is a lot faster at loading the data. Thank you both for your help with this :)
  8. W

    Pass through query to table? (Suggestions)

    Ok so i just wrote two new queries. One for the combobox SELECT EMP_REF.REFERENCE_NO AS Personal_Ref, rtrim(EMP_PERSON.FORENAME1)+ ' ' + rtrim(EMP_PERSON.SURNAME) AS Full_Name FROM trentadm.tper_reference EMP_REF RIGHT OUTER JOIN trentadm.tperson EMP_PERSON ON...
  9. W

    Pass through query to table? (Suggestions)

    I wish our IT department thought like you Minty haha. We are constantly battling with them to access to our own data. Oh thats useful to know about the ORDER BY. Learn something new everyday. There is a reason i didnt want to post the code, is because there is alot of it! haha I know there...
  10. W

    Pass through query to table? (Suggestions)

    Thank you for both your replies its much appreciated. We do not have the privileges to create views on the SQL server. All that IT will give us is SELECT privileges :( After a couple of test I noticed the code runs fine when I open it to a datasheet (double click the saved query). It is when...
  11. W

    Pass through query to table? (Suggestions)

    Hi all, I have a pass through query with multiple joins (SQL database). However the time the query takes to run is around 10 seconds. There is a combobox and subform on my main form that uses the data from this query, so it takes a while to load the combobox data. Then when a selection is made...
  12. W

    Create duplicate records based on textbox

    Hi Ridders, I pretty much finished the 2 databases today. One is for the admin creating the vacancy and one is for the admin adding the successful candidates. I had it running exactly as you wrote above. The admin creates 1 vacancy record, and input within the vacancy data how many people...
  13. W

    Create duplicate records based on textbox

    Hi all, I have form which i bound to a table. And everything works as you would expect it to. The data stored is job vacancies. However, if the is 4 vacancies for 1 job, the vacancy has to be put on 4 times so that each vacancy can have the successful candidate details attached to it at a...
  14. W

    Null if still Focus still on Textbox

    The actual name of the control is NewStarterName1 i renamed it for example purposes. I probably caused more confusion by trying to create less confusion haha. I like the look of of just text rather than a button. I have learnt my lesson now, and will never use a label as a button again!!!
  15. W

    Null if still Focus still on Textbox

    Thank you all for taking the time to reply. ridders - mentioned that i should have already moved focus when clicking the save button. Orthodox - Said there must be something, and that if I just SetFocus to something else, i will never know why it was doing it. So I used Debug.Print...
  16. W

    Null if still Focus still on Textbox

    Hi all, I am trying to make a couple of mandetory fields via VBA. If IsNull(Me.Name) Or Me.Name = "" Then MsgBox "Unable to save without a Name", vbOKOnly, "Missing Data" Exit Sub End If However, when I was testing it the textbox kept coming back as NULL even when it contained...
  17. W

    Bound form New Record

    STATIC!!! Thank you so much. Work just as i wanted :)
  18. W

    Bound form New Record

    HI all, Dont know how to explain this one, but will try my best. I have two tables:- Vacancies Applicants Three forms:- Main - contains a subform (data source = Vacancies table) Vacancies - opens vacany record when ID in subform clicked Applicants - data source is a Query of both above...
  19. W

    Goto Record on Datasheet

    I thought i was doing the right thing by splitting the post. The post linked by JHB was me trying to find a fault my form/s without using VBA, so i posted it in the 'Forms' part of the forum. However, the fault was intermittent and could not replicate the fault to give JHB the info. So i got to...
  20. W

    Goto Record on Datasheet

    Hi all, I have a datasheet, when a record is clicked it opens in my VIEW/EDIT form. The record is changed and the user clicks "save and close". Which saves to the table just fine. However, it does not update the datasheet with the new value. And when i run code to 'requery' the...
Top Bottom