I just wondered what your thoughts were on the best way to reference the 'record source' within a form or report, i am finding that it is best to use the SQL rather than the actual named query (a close version of the query can then be used without building up query listing).
Im I doing this the best way ??
User Profile
Collapse
-
Query or SQL for record source
-
'Not Like' doesn't work
I need to filter all Flint* type door styles but I can't seem to get the Not Like working as below :
If (Me.slw < 740 And Me![Door Style] not Like "Flint*") Or Me.slw > 900 Then
gives expected : expression
any ideas please ? -
Absolutely correct, have now used nested repace() to solve problem for (0's o's) (l's 1's) - thanks. -
Distinguish 0 and O's in a string
I have a user input where i do a dlookup in a table-->field but there is a need to find the string even if the original field value contains 0 or O and also if the user input contains 0 or O.
ie - CODE1234 (entered with a numeric 0) should find CODE1234 when entered with a Alph 0) -
I have just created a new form in a new DB and set closebutton properties to NO, opened the form and the help box and restore are at the top, when I press restore I get the dialog type window in the centre of the screen with close button greyed out (as expected). I then close the form from the menu bar and re-open the form and the close button re-appears.Leave a comment:
-
I change the properties on the form, if I open the form from the FORM OBJECT tab I get the same and all windows only have the 'type a question for help' box and the restore button in the top right of the form window, if i then press the restore button the form goes into dialog mode with all buttons available. I then press maximise and presto - all buttons re-appear.
Even if I go into a table datasheet view from the TABLE OBJECT tab...Leave a comment:
-
Close Button Disable - staying on
I have disabled a close button in the property section of a form (FRM1), as i open the form the close button has gone (i have programmed close button), but as i close the form, the form that opened FRM1 also has the close button disabled - and so does every form until i minimise a form and maximise again.
I have also tried to disable controlbox property but doesnt seem to remove, min, max or close - is there somewhere else i need to... -
Sorry its took so long to reply - had to leave the project for a while, i have tried the suggested, and no different, I can go into my project (DB) and the eror doesnt appear, within minutes it can re-appear with no change to coding, maybe i have a corrupt access install - cuz if i put onto the pc where the intended program will sit then i have not seen the problem occur - thanks again for your suggestions.Leave a comment:
-
Error code 2501 haunting me
I have simple error catch in my code :
Private Sub ordsch_Click()
On Error GoTo errhandler
DoCmd.OpenForm "Order Search"
errhandler:
Exit Sub
End Sub
The Order search opens a query that has a parameter request for the user to enter a search string, so it allows ok and cancel, if the user enters info - all ok, but if the user clicks cancel then i get error... -
Thanks - great tip, i wonder if you could identify the dirrerence between.
me!
me.
when do you need to bracket the control name [control]
when does forms!control or forms.control need to be used.
i get confused as to whether these are interchangable or is there a syntax for different situations, not really after answers to all - but maybe just a pointer to where there is an overview of the...Leave a comment:
-
-
-
I did it expicitly, the way i solved the problem was to create db1 and simply import 1 table and 1 report (the report with a control spelling mistake) and then tried to run and in new db1 i got expected error whereas in old db nothing - do you get a compile error if you compile {project name} when you have typed a control in wrong - im just curious you see.Leave a comment:
-
#7 suggested typing DoCmd.SetWarnin gs(True) in the immediate pane of the VBA window, this didnt solve the fact that i didnt get any warning. just wondering if i spell a control name wrong in code ie i spell me![name] as me![namr] by mistake - should the compile find this, it doesnt when i try it but when i run the report then the wrongly spelled control is found (this was basically the type of problem i was experiencing) access was not warning me...Leave a comment:
-
Expected error messages warned me of problem , the original DB was giving me no clues of errors - it seemed that error checking wasnt working, all solved now, thanks for your feedback - gud to know there are people willing to help - great forum.Leave a comment:
-
Thought I would let u know for future ref : opened new DB and inported all tables, queries, forms, reports and macros and error came back, must have been glich in current db, again thanks for your advise and support,Leave a comment:
-
I really appreciate your patience with this problem, ive tried what you have suggested - no good - but again thanks for your efforts, I have reinstalled 2003 just in case, converted file to 97 and error appeared, but don't want to go back to 97 cuz of this. If you get any future solutions to this problem i will be gratefull and again thanks for your input.Leave a comment:
-
Yes, aplying comply action, I have also found that when I write a new record in a form and the table#1 im writing to has a relationship with another table (needs to be corresponding record value in table#2) then no error warning, just doesnt write the record.
I have tried just in table design and i get 'Cannot add or change a record because a related record is required in table#2'Leave a comment:
-
Just trying to sus this, I have these lines in code of report
Me![stabelheight].visible = True
Me![stableheight] = me![stable] + 30
as you can see spelling on 1st line incorrect - this gave no warnings or error, this type of error could take me an age to find if I have a lot of code
Any clues pleaseLeave a comment:
-
Thanks for your reply, at its simplist form i have a report that displays a field / control and in the code on format I check to see if the control is > 0, if not visible = false else visible = true, if I delete the control from the report design and try to run the report the screen simply flashes as if it tried to run but no response, as soon as i re-instate the control - all ok, im sure that 97 gave error messages if control did not exist.Leave a comment:
No activity results to display
Show More
Leave a comment: