Jump to content

mas_oyama

Members
  • Posts

    23
  • Joined

  • Last visited

About mas_oyama

  • Birthday 06/26/1986

Previous Fields

  • Languages
    Java(applets and servlets), C++, SQL(not much), PHP, ASP(not much), Delphi, VB

Profile Information

  • Location
    Montreal, QC, Canada
  • Interests
    Cars, Snowboard, Computer Science, and Poker!.<br /><br />oh and my favourite "activity" is sleeping... i'm always sleeping. I'm even able to fall asleep while i'm walking(... really. it happend once.)

mas_oyama's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. mas_oyama

    user detection

    I am doing a Access application that needs, in one of my forms, detect wich user is accessing it. We have multiple DRVs(Directeur régionnal des ventes , wich means Regional Sales Director... but i dont think that "director" is the right word in english... anyway), wich supervise diffrent stores.The form I am working on is a kind of query executor. Theres a treeview with a bunch of Stored Procs in it, when you click on one, the associated controls show up, these controls are the parameters of the stored proc, and when you click on apply, the query is executed and the results are shown in a JanusGrid(a grid basically... but with more options and all... its an ActiveX control). the there is buttons and textbox where you can decide to export the data in excel, either in a plain document, or in a template, and you can ask it to start at a desired location in the excel worksheet, and you can ask to skip some columns(useful when you export in a template, and you need to jump over a "totals" column and such... its pretty cool. anyway, back to the point.the fact is, each DRV supervise a couple of stores. So m. DRV #1 supervise store #1, 7 and 43, while DRV #2 supervise stores #2, 4, 54 and 102 for example. So i need to detect wich user is accessing the form so i can show its name on the top of the form, and so i can pass it as a parameter to my Stored Proc so only the shops he supervises only. not all the shops.I'm working on a .adp database, in ADODB... i know some functions arent the same in .adp and .mdb, so i specify it...thanks!
  2. i could be sayin something totally stupid, i havent tried before i post.. but if you say between 'a' and 'b'+1, would it show up the b results? in that case, doing between 'y' and 'z'+1, then the Z results would show up...i pulled that out of my butt, i'm not even sure if SQL accepts that you zo 'z' + 1... but its worth trying
  3. i found a way, but its damn ugly! i had to write these 3 subs: (i know the name of the txt box doens match what i said earlier, i'm in a fake, testing form. Private Sub txtPath_Enter() VarString= "" txtPath = ""End SubPrivate Sub txtPath_KeyPress(KeyAscii As Integer) On Error Resume Next Select Case KeyAscii Case 8 'Bacspace VarString= "" txtPath = "" 'VarString= Left(VarString, Len(VarString) - 1) Case 13 'Enter Case Else VarString= VarString& "" & Chr(KeyAscii) End SelectEnd SubPrivate Sub txtPath_Exit(Cancel As Integer) Call MsgBox("""" + VarString+ """")End Sub VarStringis a global string variable. thats not really pretty: as soon as i enter the txtbox, i clear both the txtbox and the variable, to be sure the user start over... you'll understand why if you test. the same goes if i press backspace : if your not at end of the textbox, i cant posibly know where you are(so where to delete a character from the string). anyway, that barely works... if you type text somewhere else than at the end(if you moved with the arrows), the text will still be appended at the end of the variable... lol. thats not right!
  4. yeah well, for my part, i dont know exactly what most of these abbreviations stands for. but its not only about what does it stand for... its more about what it is! i dont know what php stands for, and i dont care! the fact is that i know what it php, and i'm not bad in developping in php. for my part, i think this is what is important(not the fact that i'm good in php... i mean the fact that i know what it it...). you cant ask for someone to be good in all these languages, but you can ask them to at least know what it is... if you ask someone what is an DNS? and they answer that its an old programming language used in the 70s, there is a problem with that candidate. but if they answer that "it is what translatethe "name" of a website into a ip adress", then i think that it should be good enough... its no big deal if he dont know that it is actually callde a Domain Name Server
  5. when i exit a textbox, in vba, it automatically remove the spaces at the end of a textbox... for example, if i type "Thats stupid "(without the quotes...), as soon as i exit the textbox, it is converted to "Thats stupid" (without quotes... duh... and without the spaces i typed). is there a way to keep those spaces? i'm developping a utility to rename files in batch, and if, for example, i want to replace all the spaces by underlines, i want to type " "(without quotes) in txtContaining, and "_"(again, without quotes...) in txtReplaceBy, so when i hit btnProcess, every file in the specified directory will be renamed, by replacing spaces by underline. the whole thing is done, i can replaces "a" for "b", or anything like that, but i can not replace spaces by something, or something by spaces, cause the stupid ****ers at microsoft decided that i cant end a text box by " "...
  6. oh well. you guys will have to wait until tomorrow to know if my front end solution is gonna work! I've been slowed down by something else(the way we are going to implement this, i had to convert the way i fill my treeview control with the procedures to a recursive procedure, it wasnt alredy recursive, and to do that, i had to change the stucture of 2 tables, so i took more than just 5 minutes!) and i we went to play badminton during lunch so i actully lost an hour and a half of work today! lol so i'll finish this tomorrow instead!
  7. Ok thats alright. i think i found a front end solution... i'll try this out and i'll post again this afternoon to say if it worked or not
  8. yeah, but the Select statement is pretty huge. also, if i that, i would have 3 select statements into 1 query and the 3 statements would be soo much similar... actually, doing that would be the same thing as splitting the 3 existing queries into the 18 queries i was talking about... what i want is to do some dynamic SQL( i just learned it does exists, but i dont know how... qnd sadly the tutorials on w3schools.com dont have any dynamic sql lessons)
  9. i work on an access projet. i have to make a screen that will be used to execute some queries and that will show the results properly. Now i have to integrate another screen that was used to execute 3 specific queries. these queries had 3 view each, and now i have to incorporate 2 display types for each of these, so i'm at 18 queries(3 main queries * 3 views * 2 display types = 18 queries), and that makes no sense since all the queries would be practically the same. the way it was done in the past is that there was 3 queries, that searched for more than what the were to show, and then, depending on the view, some fields wer hidden or shown.but now its a whole another story: i dont work with the same type of control. Its not a subform like it was. now its a JanusGrid(an ActiveX control that the company i work for bought), and i dont think i can just go and hide some fields from that. and also, my screen my be exempted of any hard coding! For example, my controls are called txt1, txt2, cbo1, cbo2, txtDate1, txtDate2, etc. so that way, i can refer to these fields in my configuration table so i can associate them with the parameters of the queries and all. Anyway, its a great way to do what I have to do, and it works really really well.but like i said, now its a whole another story, cause since i cant just go and make a combobox that were specifically made for these specific queries, and i cant just hardcode what is supposed to happen when i change the selected item in my cboBox containing the views and the display types, i assume that all this would need to be done in my queries. so, on to the point. I would to do something like this, but in TSQL rather than in VBA: dim strSQL as stringstrSQL = "Select"if cbo1 = view1 then 'cbo1 would be the combobox containing the views list for example strSQL = strSQL & ... ' some fieldselseif cbo1 = view2 strSQL = strSQL & ... ' some other filedsend if ' and then execute the query So i would like to do that, but in TSQL... is it even possible?
  10. ok. lol i posted this here cause i've coded a little bit of VB.NET, and since now i do some VBA in access, i thought it belongs in the .NET forum more than in the SQL forum!
  11. hum. well. no, not really. for 2 reasons:1) its not really in the code. its just in the textBox proprieties(sp? lol sorry for my bad english) on ControlSource.2) I can't go and put the code on the net... i'm in a company, and i've signed a contract, in witch it says i cant give the codes to ppl. i did post some code in another thread, but it was unfinished code, and i was the one who wrote that...edit: what i search actually is a kind of isnull() function that i can put in the ControlSource propriety. ... like isnull([subTrx]![txtNbTrx], 0). i dont think i could use isnull there though...
  12. ok, i have a textbox wich control source is =[subTrx]![txtNbTrx] . so it is supposed to show the value of another textbox, in the subform. the problem is that when i load the form, the query is not yet executed(its a search screen), so there is nothing yet in subtrx.txtnbtrx, so the textbox shows "#Erreur" is there a way to tell it to show "0" when the other textbox is empty?oh and yeah, i know that its not the best way to display the quantity of rows in the subform, i'm not the one who did that like that... i'm just trying to patch this up!
  13. haha yeah... honestly i just want to get away from it... lol i passed a whole day of labor for a mere 12 lines of code... lol i feel pretty stupid right now. lol. i did the 2 projects that were supposed to take me about 10 weeks in only 3 weeks, and that impressed my boss a lot, but then i have to put a whole day in 12 stupid lines of code, which arent difficult after all! anyway. now it works. so it will stay like it is. loloh and again, thx a lot for the help.
  14. i dont think i could, since i need to scan the whole table... doing udf_SubstitutePipes(Comment, Replacement1, Replacement2) would do one row. but anyway, once the query will be created, no one will have to go back in it.oh and thx for the isnull() function... i did something else that wasnt really pretty : lolanyway, thx for the info, it has been really useful
  15. oh and Query analyser is a tool made by micro$oft. basically, it is used to test you queries before you actually implent them. it can also be used to actually make your stored proc. by adding alter function at the beginning of your code.and no, i cant write stored procedures in that specific Database. i can in another db, but not on that one. but when my query will be finished, i'll give the code to my suppervisor, and he'll create it from his login
×
×
  • Create New...